How to use the setNumber function from bindings

Find comprehensive JavaScript bindings.setNumber code examples handpicked from public code repositorys.

34
35
36
37
38
39
40
41
42
43
if ((record == null) || (record == undefined))
        continue;
*/
console.log(astlib.toString(record));

astlib.setNumber(record, ASTERIX.TRACK_NUMBER, 1111);

var buffer2 = astlib.encodeAsterixRecord(record, 'Eurocontrol-62:1.16');
if (buffer2)
        client.send(buffer2, 50001, 'localhost', (err) => { /*client.close();*/ });
fork icon4
star icon8
watch icon4

50
51
52
53
54
55
56
57
58
59
console.log(buffer);

for(var i = 0; i < 30000; i++) {
        var records = astlib.decodeAsterixBuffer('Eurocontrol-48:1.21', buffer);
        var record = records[0];
        astlib.setNumber(plot, ASTERIX.TIMEOFDAY, 3601);
        astlib.setBoolean(plot, ASTERIX.MODE2_V, true);
        astlib.setBoolean(plot, ASTERIX.MODE2_G, true);
        astlib.setBoolean(plot, ASTERIX.MODE2_L, true);
        astlib.setNumber(plot, ASTERIX.TRACK_DETECTION, 3);
fork icon4
star icon8
watch icon4

+ 31 other calls in file

66
67
68
69
70
71
72
73
74
75
    astlib.setNumber(record, TIMEOFDAY, Utils.secsAfterMidnight());
}

function setSourceId(profile, record, model) {   
    astlib.setNumber(record, DSI_SAC, SAC);
    astlib.setNumber(record, DSI_SIC, SIC);
}

function setFacility(profile, record, model) {
    astlib.setNumber(record, TRACK_NUMBER, model.trackNumber);
fork icon4
star icon8
watch icon4

+ 53 other calls in file

48
49
50
51
52
53
54
55
56

describe('#set/get', function() {
        it('Real Number', function() {
                var pi = 3.14;
                assert(astlib.hasItem(asterixRecord, TRACK_POSITION_LATITUDE) == false);
                astlib.setNumber(asterixRecord, TRACK_POSITION_LATITUDE, pi);
                assert(astlib.hasItem(asterixRecord, TRACK_POSITION_LATITUDE) == true); 
                assert(astlib.getNumber(asterixRecord, TRACK_POSITION_LATITUDE) == pi);
        });
fork icon4
star icon8
watch icon4

+ 104 other calls in file

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)