Subversion Repositories tpanel

Rev

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

Rev 168 Rev 169
Line 34... Line 34...
34
#include "texternal.h"
34
#include "texternal.h"
35
#include "tamxnet.h"
35
#include "tamxnet.h"
36
#include "tamxcommands.h"
36
#include "tamxcommands.h"
37
#include "tsystemdraw.h"
37
#include "tsystemdraw.h"
38
#include "tsipclient.h"
38
#include "tsipclient.h"
-
 
39
#include "tvector.h"
39
 
40
 
40
#define REG_CMD(func, name)     registerCommand(bind(&TPageManager::func, this,std::placeholders::_1,std::placeholders::_2,std::placeholders::_3),name)
41
#define REG_CMD(func, name)     registerCommand(bind(&TPageManager::func, this,std::placeholders::_1,std::placeholders::_2,std::placeholders::_3),name)
41
 
42
 
42
class TIcons;
43
class TIcons;
43
class TPageManager;
44
class TPageManager;
Line 273... Line 274...
273
         * long as a valid communication is possible or until the communication
274
         * long as a valid communication is possible or until the communication
274
         * end by a command.
275
         * end by a command.
275
         */
276
         */
276
        void startUp();
277
        void startUp();
277
        /**
278
        /**
-
 
279
         * This starts a thread running the command loop. Each event from the
-
 
280
         * Netlinx is entered into a vector array (doCommand()) and this this
-
 
281
         * method starts the event loop as a thread running as long as this
-
 
282
         * class exists.
-
 
283
         */
-
 
284
        void runCommands();
-
 
285
        /**
-
 
286
         * This method is the thread started by the command runCommands().
-
 
287
         */
-
 
288
        void commandLoop();
-
 
289
        /**
278
         * Callback function for the AMX controller part. This function must
290
         * Callback function for the AMX controller part. This function must
279
         * be registered to the class TAmxNet and is called from this module
291
         * be registered to the class TAmxNet and is called from this module
280
         * every time an event occured from the controller.
292
         * every time an event occured from the controller.
281
         * This method handles the commands comming from the controller and
293
         * This method handles the commands comming from the controller and
282
         * draws the necessary elements before they are sent to the GUI.
294
         * draws the necessary elements before they are sent to the GUI.
Line 550... Line 562...
550
        TPalette *mPalette{nullptr};                    // Pointer to the color handler
562
        TPalette *mPalette{nullptr};                    // Pointer to the color handler
551
        TFont *mFonts{nullptr};                         // Pointer to the font handler
563
        TFont *mFonts{nullptr};                         // Pointer to the font handler
552
        TExternal *mExternal{nullptr};                  // Pointer to the external buttons (if any)
564
        TExternal *mExternal{nullptr};                  // Pointer to the external buttons (if any)
553
        TSystemDraw *mSystemDraw{nullptr};              // A pointer to the (optional) system resources
565
        TSystemDraw *mSystemDraw{nullptr};              // A pointer to the (optional) system resources
554
        std::thread mThreadAmxNet;                      // The thread handle to the controler handler
566
        std::thread mThreadAmxNet;                      // The thread handle to the controler handler
555
        std::vector<amx::ANET_COMMAND> mCommands;       // Command queue of commands received from controller
567
        TVector<amx::ANET_COMMAND> mCommands;           // Command queue of commands received from controller
556
        bool mBusy{false};                              // Internal used to block the command handler
568
        std::atomic<bool> mBusy{false};                 // Internal used to block the command handler
557
        std::string mCmdBuffer;                         // Internal used buffer for commands who need more than one network package
569
        std::string mCmdBuffer;                         // Internal used buffer for commands who need more than one network package
558
        std::string mAkbText;                           // This is the text for the virtual keyboard (@AKB)
570
        std::string mAkbText;                           // This is the text for the virtual keyboard (@AKB)
559
        std::string mAkpText;                           // This is the text for the virtual keyad (@AKP)
571
        std::string mAkpText;                           // This is the text for the virtual keyad (@AKP)
560
        bool mPassThrough{false};                       // Can ve set to true with the command ^KPS
572
        bool mPassThrough{false};                       // Can ve set to true with the command ^KPS
561
        bool mInformOrientation{false};                 // TRUE = The actual screen orientation is reported to the controller if it change.
573
        bool mInformOrientation{false};                 // TRUE = The actual screen orientation is reported to the controller if it change.
562
        int mOrientation{0};                            // Contains the actual orientation.
574
        int mOrientation{0};                            // Contains the actual orientation.
563
        int mLastPagePush{0};                           // The number of the last page received a push (key press / mouse hit)
575
        int mLastPagePush{0};                           // The number of the last page received a push (key press / mouse hit)
564
        double mDPI{96.0};                              // DPI (Dots Per Inch) of the primary display.
576
        double mDPI{96.0};                              // DPI (Dots Per Inch) of the primary display.
-
 
577
        std::atomic<bool> cmdLoop_busy{false};          // As long as this is true the command loop thread is active
-
 
578
        std::thread mThreadCommand;                     // Thread handle for command loop thread.
565
        // SIP
579
        // SIP
566
#ifndef _NOSIP_
580
#ifndef _NOSIP_
567
        bool mPHNautoanswer{false};                     // The state of the SIP autoanswer
581
        bool mPHNautoanswer{false};                     // The state of the SIP autoanswer
568
        TSIPClient *mSIPClient{nullptr};                // Includes the SIP client
582
        TSIPClient *mSIPClient{nullptr};                // Includes the SIP client
569
#endif
583
#endif