| |
| #ifndef CLIENT_HH |
| #define CLIENT_HH |
| |
| #include "Service.hh" |
| #include "umlrtcapsule.hh" |
| #include "umlrtcapsuleclass.hh" |
| #include "umlrtlogprotocol.hh" |
| #include "umlrtmessage.hh" |
| #include "umlrttimerprotocol.hh" |
| struct UMLRTCommsPort; |
| struct UMLRTSlot; |
| |
| class Capsule_Client : public UMLRTCapsule |
| { |
| public: |
| Capsule_Client( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat ); |
| protected: |
| UMLRTLogProtocol_baserole log; |
| Service::Conj service; |
| public: |
| enum InternalPortId |
| { |
| internalport_service, |
| internalport_timing, |
| internalport_log |
| }; |
| protected: |
| UMLRTTimerProtocol_baserole timing; |
| public: |
| enum PartId |
| { |
| }; |
| enum PortId |
| { |
| port_log, |
| port_service, |
| port_timing |
| }; |
| virtual void bindPort( bool isBorder, int portId, int index ); |
| virtual void unbindPort( bool isBorder, int portId, int index ); |
| virtual void inject( const UMLRTMessage & message ); |
| virtual void initialize( const UMLRTMessage & message ); |
| const char * getCurrentStateString() const; |
| private: |
| enum State |
| { |
| Done, |
| Ready, |
| TimedOut, |
| WaitingForServiceToBeReady, |
| SPECIAL_INTERNAL_STATE_UNVISITED |
| }; |
| const char * stateNames[5]; |
| State currentState; |
| void entryaction_____Done( const UMLRTMessage * msg ); |
| void entryaction_____Ready( const UMLRTMessage * msg ); |
| void entryaction_____TimedOut( const UMLRTMessage * msg ); |
| void entryaction_____WaitingForServiceToBeReady( const UMLRTMessage * msg ); |
| void exitaction_____Ready( const UMLRTMessage * msg ); |
| void exitaction_____WaitingForServiceToBeReady( const UMLRTMessage * msg ); |
| void actionchain_____Initial( const UMLRTMessage * msg ); |
| void actionchain_____TransitionAction2( const UMLRTMessage * msg ); |
| void actionchain_____TransitionAction3( const UMLRTMessage * msg ); |
| void actionchain_____timeout1( const UMLRTMessage * msg ); |
| void actionchain_____timeout2( const UMLRTMessage * msg ); |
| State state_____Done( const UMLRTMessage * msg ); |
| State state_____Ready( const UMLRTMessage * msg ); |
| State state_____TimedOut( const UMLRTMessage * msg ); |
| State state_____WaitingForServiceToBeReady( const UMLRTMessage * msg ); |
| }; |
| extern const UMLRTCapsuleClass Client; |
| |
| #endif |
| |