Subversion Repositories tpanel

Rev

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

Rev 110 Rev 111
Line 319... Line 319...
319
 
319
 
320
//    REG_CMD(doLPC, "^LPC");     // Clear all users from the User Access Passwords list on the Password Setup page.
320
//    REG_CMD(doLPC, "^LPC");     // Clear all users from the User Access Passwords list on the Password Setup page.
321
//    REG_CMD(doLPR, "^LPR");     // Remove a given user from the User Access Passwords list on the Password Setup page.
321
//    REG_CMD(doLPR, "^LPR");     // Remove a given user from the User Access Passwords list on the Password Setup page.
322
//    REG_CMD(doLPS, "^LPS");     // Set the user name and password.
322
//    REG_CMD(doLPS, "^LPS");     // Set the user name and password.
323
 
323
 
324
//    REG_CMD(doKPS, "^KPS");     // Set the keyboard passthru.
324
    REG_CMD(doKPS, "^KPS");     // Set the keyboard passthru.
325
//    REG_CMD(doVKS, "^VKS");     // Send one or more virtual key strokes to the G4 application.
325
    REG_CMD(doVKS, "^VKS");     // Send one or more virtual key strokes to the G4 application.
326
 
326
 
327
//    REG_CMD(doPWD, "@PWD");     // Set the page flip password.
327
//    REG_CMD(doPWD, "@PWD");     // Set the page flip password.
328
//    REG_CMD(doPWD, "^PWD");     // Set the page flip password.
328
//    REG_CMD(doPWD, "^PWD");     // Set the page flip password.
329
 
329
 
330
    REG_CMD(doBBR, "^BBR");     // Set the bitmap of a button to use a particular resource.
330
    REG_CMD(doBBR, "^BBR");     // Set the bitmap of a button to use a particular resource.
331
    REG_CMD(doRAF, "^RAF");     // Add new resources
331
    REG_CMD(doRAF, "^RAF");     // Add new resources
332
    REG_CMD(doRFR, "^RFR");     // Force a refresh for a given resource.
332
    REG_CMD(doRFR, "^RFR");     // Force a refresh for a given resource.
333
    REG_CMD(doRMF, "^RMF");     // Modify an existing resource.
333
    REG_CMD(doRMF, "^RMF");     // Modify an existing resource.
334
//    REG_CMD(doRSR, "^RSR");     // Change the refresh rate for a given resource.
334
    REG_CMD(doRSR, "^RSR");     // Change the refresh rate for a given resource.
335
 
335
 
336
    REG_CMD(doABEEP, "ABEEP");  // Output a single beep even if beep is Off.
336
    REG_CMD(doABEEP, "ABEEP");  // Output a single beep even if beep is Off.
337
    REG_CMD(doADBEEP, "ADBEEP");// Output a double beep even if beep is Off.
337
    REG_CMD(doADBEEP, "ADBEEP");// Output a double beep even if beep is Off.
338
    REG_CMD(doAKB, "@AKB");     // Pop up the keyboard icon and initialize the text string to that specified.
338
    REG_CMD(doAKB, "@AKB");     // Pop up the keyboard icon and initialize the text string to that specified.
339
    REG_CMD(doAKEYB, "AKEYB");  // Pop up the keyboard icon and initialize the text string to that specified.
339
    REG_CMD(doAKEYB, "AKEYB");  // Pop up the keyboard icon and initialize the text string to that specified.
Line 2563... Line 2563...
2563
        gAmxNet->sendCommand(scmd);
2563
        gAmxNet->sendCommand(scmd);
2564
    else
2564
    else
2565
        MSG_WARNING("Missing global class TAmxNet. Can't send message!");
2565
        MSG_WARNING("Missing global class TAmxNet. Can't send message!");
2566
}
2566
}
2567
 
2567
 
-
 
2568
void TPageManager::sendKeyStroke(char key)
-
 
2569
{
-
 
2570
    DECL_TRACER("TPageManager::sendKeyStroke(char key)");
-
 
2571
 
-
 
2572
    if (!key)
-
 
2573
        return;
-
 
2574
 
-
 
2575
    char msg[2];
-
 
2576
    msg[0] = key;
-
 
2577
    msg[1] = 0;
-
 
2578
 
-
 
2579
    amx::ANET_SEND scmd;
-
 
2580
    scmd.port = 1;
-
 
2581
    scmd.channel = 0;
-
 
2582
    scmd.msg.assign(msg);
-
 
2583
    scmd.MC = 0x008b;
-
 
2584
 
-
 
2585
    if (gAmxNet)
-
 
2586
        gAmxNet->sendCommand(scmd);
-
 
2587
    else
-
 
2588
        MSG_WARNING("Missing global class TAmxNet. Can't send message!");
-
 
2589
 
-
 
2590
}
-
 
2591
 
2568
/**
2592
/**
2569
 * Sending a custom event is identical in all cases. Because of this I
2593
 * Sending a custom event is identical in all cases. Because of this I
2570
 * implemented this method to send a custom event. This is called in all cases
2594
 * implemented this method to send a custom event. This is called in all cases
2571
 * where a ?XXX command is received.
2595
 * where a ?XXX command is received.
2572
 *
2596
 *
Line 6213... Line 6237...
6213
            else
6237
            else
6214
                bt->setText(text, btState - 1);
6238
                bt->setText(text, btState - 1);
6215
        }
6239
        }
6216
    }
6240
    }
6217
}
6241
}
-
 
6242
 
-
 
6243
/**
-
 
6244
 * Set the keyboard passthru.
-
 
6245
 */
-
 
6246
void TPageManager::doKPS(int, vector<int>&, vector<string>& pars)
-
 
6247
{
-
 
6248
    DECL_TRACER("TPageManager::doKPS(int, vector<int>&, vector<string>& pars)");
-
 
6249
 
-
 
6250
    if (pars.size() < 1)
-
 
6251
    {
-
 
6252
        MSG_ERROR("Got no parameter. Ignoring command!");
-
 
6253
        return;
-
 
6254
    }
-
 
6255
 
-
 
6256
    int state = atoi(pars[0].c_str());
-
 
6257
 
-
 
6258
    if (state == 0)
-
 
6259
        mPassThrough = false;
-
 
6260
    else if (state == 5)
-
 
6261
        mPassThrough = true;
-
 
6262
}
-
 
6263
 
-
 
6264
void TPageManager::doVKS(int, std::vector<int>&, vector<string>& pars)
-
 
6265
{
-
 
6266
    DECL_TRACER("TPageManager::doVKS(int, std::vector<int>&, vector<string>& pars)");
-
 
6267
 
-
 
6268
    if (pars.size() < 1)
-
 
6269
    {
-
 
6270
        MSG_ERROR("Got no parameter. Ignoring command!");
-
 
6271
        return;
-
 
6272
    }
-
 
6273
 
-
 
6274
    if (_sendVirtualKeys)
-
 
6275
        _sendVirtualKeys(pars[0]);
-
 
6276
}
-
 
6277
 
6218
/*
6278
/*
6219
 * Set the bitmap of a button to use a particular resource.
6279
 * Set the bitmap of a button to use a particular resource.
6220
 * Syntax:
6280
 * Syntax:
6221
 *    "'^BBR-<vt addr range>,<button states range>,<resource name>'"
6281
 *    "'^BBR-<vt addr range>,<button states range>,<resource name>'"
6222
 * Variable:
6282
 * Variable:
Line 6349... Line 6409...
6349
        if (gPrjResources)
6409
        if (gPrjResources)
6350
            gPrjResources->addResource(name, res.protocol, res.host, res.path, res.file, res.user, res.password, res.refresh);
6410
            gPrjResources->addResource(name, res.protocol, res.host, res.path, res.file, res.user, res.password, res.refresh);
6351
    }
6411
    }
6352
}
6412
}
6353
 
6413
 
6354
void TPageManager::doRFR(int port, vector<int>& channels, vector<string>& pars)
6414
void TPageManager::doRFR(int, vector<int>&, vector<string>& pars)
6355
{
6415
{
6356
    DECL_TRACER("TPageManager::doRFR(int port, vector<int>& channels, vector<string>& pars)");
6416
    DECL_TRACER("TPageManager::doRFR(int port, vector<int>& channels, vector<string>& pars)");
6357
 
6417
 
6358
    if (pars.size() < 1)
6418
    if (pars.size() < 1)
6359
    {
6419
    {
Line 6458... Line 6518...
6458
            gPrjResources->setResource(name, res.protocol, res.host, res.path, res.file, res.user, res.password, res.refresh);
6518
            gPrjResources->setResource(name, res.protocol, res.host, res.path, res.file, res.user, res.password, res.refresh);
6459
    }
6519
    }
6460
}
6520
}
6461
 
6521
 
6462
/**
6522
/**
-
 
6523
 * Change the refresh rate for a given resource.
-
 
6524
 */
-
 
6525
void TPageManager::doRSR(int, vector<int>&, vector<string>& pars)
-
 
6526
{
-
 
6527
    DECL_TRACER("TPageManager::doRSR(int, vector<int>&, vector<string>& pars)");
-
 
6528
 
-
 
6529
    if (pars.size() < 2)
-
 
6530
    {
-
 
6531
        MSG_ERROR("Expecting 2 parameters but got none! Ignoring command.");
-
 
6532
        return;
-
 
6533
    }
-
 
6534
 
-
 
6535
    string resName = pars[0];
-
 
6536
    int resRefresh = atoi(pars[1].c_str());
-
 
6537
 
-
 
6538
    if (!gPrjResources)
-
 
6539
    {
-
 
6540
        MSG_ERROR("Missing the resource module. Ignoring command!");
-
 
6541
        return;
-
 
6542
    }
-
 
6543
 
-
 
6544
    RESOURCE_T res = gPrjResources->findResource(resName);
-
 
6545
 
-
 
6546
    if (res.name.empty() || res.refresh == resRefresh)
-
 
6547
        return;
-
 
6548
 
-
 
6549
    gPrjResources->setResource(resName, res.protocol, res.host, res.path, res.file, res.user, res.password, resRefresh);
-
 
6550
}
-
 
6551
 
-
 
6552
/**
6463
 * @brief TPageManager::doAKB - Pop up the keyboard icon
6553
 * @brief TPageManager::doAKB - Pop up the keyboard icon
6464
 * Pop up the keyboard icon and initialize the text string to that specified.
6554
 * Pop up the keyboard icon and initialize the text string to that specified.
6465
 * Keyboard string is set to null on power up and is stored until power is lost.
6555
 * Keyboard string is set to null on power up and is stored until power is lost.
6466
 * The Prompt Text is optional.
6556
 * The Prompt Text is optional.
6467
 */
6557
 */