blob: 2058dd25b776dd40532f8e4e11b11ff8bef5ef3e [file] [log] [blame]
#ifndef COMPUTERSYSTEM_HH
#define COMPUTERSYSTEM_HH
#include "umlrtcapsule.hh"
#include "umlrtcapsuleclass.hh"
#include "umlrtframeprotocol.hh"
#include "umlrtmessage.hh"
#include "umlrttimerid.hh"
#include "umlrttimerprotocol.hh"
struct UMLRTCapsulePart;
struct UMLRTCommsPort;
struct UMLRTSlot;
class Capsule_ComputerSystem : public UMLRTCapsule
{
public:
Capsule_ComputerSystem( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
enum PortId
{
port_frame,
port_timer
};
virtual void inject( const UMLRTMessage & message );
virtual void initialize( const UMLRTMessage & message );
const char * getCurrentStateString() const;
private:
enum State
{
top__Failure,
top__Running,
top__WaitingForComputerInit,
top__WaitingForDeviceInit,
SPECIAL_INTERNAL_STATE_UNVISITED
};
const char * stateNames[5];
State currentState;
void entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failure__ComputerSystemFailed( const UMLRTMessage * msg );
void entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Running__Running( const UMLRTMessage * msg );
void entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__WaitingForComputerInit__waitingForComputerInit( const UMLRTMessage * msg );
void entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__WaitingForDeviceInit__waitForDeviceInit( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed__IncarnateFail( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success__devicesIncarnated( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__compTimerFail__TimerFail( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__incarnateDevices__incarnateDevicesAndWait( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__incarnateUser__incarnateUser( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__setComputerInitTimer__setComputerTimer( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__timerOK__TimerSet( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK__errorIncarnatingUser( const UMLRTMessage * msg );
void transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK__userIncarnated( const UMLRTMessage * msg );
bool guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed__Failed( const UMLRTMessage * msg );
bool guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success__Constraint( const UMLRTMessage * msg );
bool guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__compTimerFail__Failed( const UMLRTMessage * msg );
bool guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__timerOK__validTimer( const UMLRTMessage * msg );
bool guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK__userNOK( const UMLRTMessage * msg );
bool guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK__userOK( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__compTimerFail( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__incarnateDevices( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__incarnateUser( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__setComputerInitTimer( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__timerOK( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK( const UMLRTMessage * msg );
void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK( const UMLRTMessage * msg );
State choice_____top__ChoicePoint2( const UMLRTMessage * msg );
State choice_____top__ChoicePoint3( const UMLRTMessage * msg );
State choice_____top__ChoicePoint4( const UMLRTMessage * msg );
State state_____top__Failure( const UMLRTMessage * msg );
State state_____top__Running( const UMLRTMessage * msg );
State state_____top__WaitingForComputerInit( const UMLRTMessage * msg );
State state_____top__WaitingForDeviceInit( const UMLRTMessage * msg );
protected:
UMLRTFrameProtocol_baserole frame;
public:
enum BorderPortId
{
borderport_frame,
borderport_timer
};
protected:
UMLRTTimerProtocol_baserole timer;
public:
enum PartId
{
part_computer,
part_massStorage,
part_printer,
part_user
};
protected:
const UMLRTCapsulePart * const computer;
const UMLRTCapsulePart * const massStorage;
const UMLRTCapsulePart * const printer;
const UMLRTCapsulePart * const user;
public:
virtual void bindPort( bool isBorder, int portId, int index );
virtual void unbindPort( bool isBorder, int portId, int index );
protected:
bool initStatus;
UMLRTTimerId timerID;
bool _dummiest;
int numSec;
};
extern const UMLRTCapsuleClass ComputerSystem;
#endif