Subversion Repositories tpanel

Rev

Rev 318 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 318 Rev 326
Line 73... Line 73...
73
    "^STG",
73
    "^STG",
74
    // G5 commands
74
    // G5 commands
75
    "^ABP-", "^ADB", "^SOU-", "^STP", "^TKP-", "^PGE-", "^PPA-", "^PPF-",
75
    "^ABP-", "^ADB", "^SOU-", "^STP", "^TKP-", "^PGE-", "^PPA-", "^PPF-",
76
    "^PPG-", "^PPK-", "^PPM-", "^PPN-", "^PPT-", "^PPX", "^UTF-", "^LVC-",
76
    "^PPG-", "^PPK-", "^PPM-", "^PPN-", "^PPT-", "^PPX", "^UTF-", "^LVC-",
77
    "^LVD-", "^LVE-", "^LVF-", "^LVL-", "^LVM-", "^LVN-", "^LVR-", "^LVS-",
77
    "^LVD-", "^LVE-", "^LVF-", "^LVL-", "^LVM-", "^LVN-", "^LVR-", "^LVS-",
78
    "\0"
78
    "^MUT-", "\0"
79
};
79
};
80
 
80
 
81
#define NUMBER_CMDS     144
81
#define NUMBER_CMDS     144
82
 
82
 
83
std::atomic<bool> killed{false};
83
std::atomic<bool> killed{false};
Line 1234... Line 1234...
1234
            {
1234
            {
1235
                com.data.message_value.device = com.device2;
1235
                com.data.message_value.device = com.device2;
1236
                com.data.message_value.port = s.port;
1236
                com.data.message_value.port = s.port;
1237
                com.data.message_value.system = com.system;
1237
                com.data.message_value.system = com.system;
1238
                com.data.message_value.value = s.level;
1238
                com.data.message_value.value = s.level;
1239
                com.data.message_value.type = 0x20;     // unsigned integer
1239
                com.data.message_value.type = DTSZ_UINT;     // unsigned integer
1240
                com.data.message_value.content.integer = s.value;
1240
                com.data.message_value.content.integer = s.value;
1241
                com.hlen = 0x0016 - 0x0003 + 11;
1241
                com.hlen = 0x0016 - 0x0003 + 11;
1242
                MSG_DEBUG("SEND: LEVEL-" << s.value << "," << s.level << ":" << s.port << ":" << com.device2);
1242
                MSG_DEBUG("SEND: LEVEL-" << s.value << "," << s.level << ":" << s.port << ":" << com.device2);
1243
                comStack.push_back(com);
1243
                comStack.push_back(com);
1244
                mSendReady = true;
1244
                mSendReady = true;
Line 1250... Line 1250...
1250
            if (gPageManager && gPageManager->getRxSendState())
1250
            if (gPageManager && gPageManager->getRxSendState())
1251
            {
1251
            {
1252
                com.data.message_string.device = com.device2;
1252
                com.data.message_string.device = com.device2;
1253
                com.data.message_string.port = s.port;
1253
                com.data.message_string.port = s.port;
1254
                com.data.message_string.system = com.system;
1254
                com.data.message_string.system = com.system;
1255
                com.data.message_string.type = 0x01;    // char string
1255
                com.data.message_string.type = DTSZ_STRING;    // char string
1256
 
1256
 
1257
                if (s.msg.length() >= sizeof(com.data.message_string.content))
1257
                if (s.msg.length() >= sizeof(com.data.message_string.content))
1258
                    len = sizeof(com.data.message_string.content) - 1;
1258
                    len = sizeof(com.data.message_string.content) - 1;
1259
                else
1259
                else
1260
                    len = s.msg.length();
1260
                    len = s.msg.length();
Line 1328... Line 1328...
1328
        case 0x0093:        // string size
1328
        case 0x0093:        // string size
1329
        case 0x0094:        // command size
1329
        case 0x0094:        // command size
1330
            com.data.sendSize.device = com.device2;
1330
            com.data.sendSize.device = com.device2;
1331
            com.data.sendSize.port = s.port;
1331
            com.data.sendSize.port = s.port;
1332
            com.data.sendSize.system = com.system;
1332
            com.data.sendSize.system = com.system;
1333
            com.data.sendSize.type = 0x01;
1333
            com.data.sendSize.type = DTSZ_STRING;
1334
            com.data.sendSize.length = s.value;
1334
            com.data.sendSize.length = s.value;
1335
            com.hlen = 0x0016 - 3 + 9;
1335
            com.hlen = 0x0016 - 3 + 9;
1336
            comStack.push_back(com);
1336
            comStack.push_back(com);
1337
            mSendReady = true;
1337
            mSendReady = true;
1338
        break;
1338
        break;
Line 1357... Line 1357...
1357
        case 0x0096:        // Status code
1357
        case 0x0096:        // Status code
1358
            com.data.sendStatusCode.device = com.device2;
1358
            com.data.sendStatusCode.device = com.device2;
1359
            com.data.sendStatusCode.port = s.port;
1359
            com.data.sendStatusCode.port = s.port;
1360
            com.data.sendStatusCode.system = com.system;
1360
            com.data.sendStatusCode.system = com.system;
1361
            com.data.sendStatusCode.status = 0;
1361
            com.data.sendStatusCode.status = 0;
1362
            com.data.sendStatusCode.type = 0x11;
1362
            com.data.sendStatusCode.type = DTSZ_CHAR;
1363
            com.data.sendStatusCode.length = 2;
1363
            com.data.sendStatusCode.length = 2;
1364
            com.data.sendStatusCode.str[0] = 'O';
1364
            com.data.sendStatusCode.str[0] = 'O';
1365
            com.data.sendStatusCode.str[1] = 'K';
1365
            com.data.sendStatusCode.str[1] = 'K';
1366
            com.hlen = 0x0016 - 3 + 13;
1366
            com.hlen = 0x0016 - 3 + 13;
1367
            comStack.push_back(com);
1367
            comStack.push_back(com);