C++ TargetRTS
Loading...
Searching...
No Matches
RTCustomController.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2021. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTCustomController_h__
11#define __RTCustomController_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTActor_h__
18#include <RTActor.h>
19#endif
20
21#ifndef __RTPeerController_h__
22#include <RTPeerController.h>
23#endif
24
25typedef void ( RTActor:: * RTActorFunction )( void );
26
27#define REGISTER_LAYER( wait, wakeup, process ) \
28 (static_cast<RTCustomController *>(context()))->registerLayer( this, \
29 wait, \
30 wakeup, \
31 process )
32
34{
35private:
36 RTActor * _customLayer;
37 RTActorFunction _waitFunc;
38 RTActorFunction _wakeupFunc;
39 RTActorFunction _processFunc;
40
41public:
42 RTCustomController( RTDebugger *, const char * );
43 virtual ~RTCustomController( void );
44
45 virtual void mainLoop( void ) override;
46
47 // a custom actor object may register its address, and
48 // the 'waitForEvents', 'wakeup' and 'processIPCData'
49 // methods to be called by the RTCustomController:
50
51 void registerLayer( RTActor *,
52 RTActorFunction waitFunc,
53 RTActorFunction wakeupFunc,
54 RTActorFunction processFunc );
55
56protected:
57 virtual void waitForEvents( void ) override;
58 virtual void wakeup( void ) override;
59
60private:
61 // unavailable methods
63 RTCustomController & operator=( const RTCustomController & );
64}; //lint !e1712
65
66#endif // __RTCustomController_h__
An instance of this class represents a capsule instance.
Definition: RTActor.h:44
Definition: RTCustomController.h:34
Definition: RTDebugger.h:58
A controller that acts as an interface to a physical thread which runs a group of capsule instances i...
Definition: RTPeerController.h:27