1.0.75 • Published 5 years ago

icmp_test v1.0.75

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

bc-lottery-ball-control-node

Nodejs library to control lottery machine

  1. npm install
  2. node index.backup.js targetIP loop

How to setup

  1. npm install icmp_test
  2. npm install node-loader (https://www.npmjs.com/package/node-loader)
  3. add
    {
        test: /\.node$/,
        use: 'node-loader'
    }
    to webpack.config.js in module -> rules
  4. npm i -D electron-rebuild
  5. run -------------> ./node_modules/.bin/electron-rebuild <--------------- (4-5 ref: https://github.com/serialport/node-serialport/issues/1910)
  6. set -------------> app.allowRendererProcessReuse = false; <--------------- in main

How to Use the library in electron

    import LotteryControl from 'icmp_test'

    var lotteryControlF5 = new LotteryControl()
    lotteryControlF5.main("192.168.167.131", "F5", "1", 100)
    setInterval(lotteryControlF5.execute, 0)

    var listenerF5 = function listenerF5(ball1, ball2, ball3, ball4, ball5) {
        console.log(ball1);
        console.log(ball2);
        console.log(ball3);
        console.log(ball4);
        console.log(ball5);
    }

    lotteryControlF5.eventEmitter.addListener('receive_balls', listenerF5)
    lotteryControlF5.eventEmitter.removeListener('receive_balls', listenerF5)

    var lotteryControlF3 = new LotteryControl()
    lotteryControlF3.main("192.168.167.143", "F3", "1", 100)
    setInterval(lotteryControlF3.execute, 0)

    var listenerF3 = function listenerF3(ball1, ball2, ball3) {
        console.log(ball1);
        console.log(ball2);
        console.log(ball3);
    }

    lotteryControlF3.eventEmitter.addListener('receive_balls', listenerF3)
    lotteryControlF3.eventEmitter.removeListener('receive_balls', listenerF3)

    var lotteryControlF1 = new LotteryControl()
    lotteryControlF1.main("192.168.167.101", "F1", "1", 100)
    setInterval(lotteryControlF1.execute, 0)

    var listenerF1 = function listenerF1(ball1, ball2, ball3, ball4, ball5, ball6, ball7) {
        console.log(ball1);
        console.log(ball2);
        console.log(ball3);
        console.log(ball4);
        console.log(ball5);
        console.log(ball6);
        console.log(ball7);
    }

    lotteryControlF1.eventEmitter.addListener('receive_balls', listenerF1)
    lotteryControlF1.eventEmitter.removeListener('receive_balls', listenerF1)

    var lotteryControlF2 = new LotteryControl()
    lotteryControlF2.main("192.168.167.111", "F2", "1", 100)
    setInterval(lotteryControlF2.execute, 0)

    var listenerF2 = function listenerF2(ball1, ball2, ball3, ball4, ball5) {
        console.log(ball1);
        console.log(ball2);
        console.log(ball3);
        console.log(ball4);
        console.log(ball5);
    }

    lotteryControlF2.eventEmitter.addListener('receive_balls', listenerF2)
    lotteryControlF2.eventEmitter.removeListener('receive_balls', listenerF2)
1.0.75

5 years ago

1.0.74

5 years ago

1.0.73

5 years ago

1.0.72

5 years ago

1.0.71

5 years ago

1.0.70

5 years ago

1.0.69

5 years ago

1.0.66

5 years ago

1.0.64

5 years ago

1.0.63

5 years ago

1.0.68

5 years ago

1.0.67

5 years ago

1.0.62

5 years ago

1.0.61

5 years ago

1.0.60

5 years ago

1.0.59

5 years ago

1.0.58

5 years ago

1.0.57

5 years ago

1.0.56

5 years ago

1.0.55

5 years ago

1.0.54

5 years ago

1.0.53

5 years ago

1.0.51

5 years ago

1.0.52

5 years ago

1.0.49

5 years ago

1.0.50

5 years ago

1.0.48

5 years ago

1.0.47

5 years ago

1.0.46

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.39

5 years ago

1.0.17

5 years ago

1.0.38

5 years ago

1.0.16

5 years ago

1.0.40

5 years ago

1.0.44

5 years ago

1.0.22

5 years ago

1.0.43

5 years ago

1.0.21

5 years ago

1.0.42

5 years ago

1.0.20

5 years ago

1.0.41

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.45

5 years ago

1.0.23

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.33

5 years ago

1.0.11

5 years ago

1.0.32

5 years ago

1.0.10

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.37

5 years ago

1.0.15

5 years ago

1.0.36

5 years ago

1.0.14

5 years ago

1.0.35

5 years ago

1.0.13

5 years ago

1.0.34

5 years ago

1.0.12

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago