// ====================================================================== // \title SmStateQueuedComponentAc.cpp // \author Generated by fpp-to-cpp // \brief cpp file for SmStateQueued component base class // ====================================================================== #include "Fw/Types/Assert.hpp" #include "Fw/Types/ExternalString.hpp" #if FW_ENABLE_TEXT_LOGGING #include "Fw/Types/String.hpp" #endif #include "base/SmStateQueuedComponentAc.hpp" namespace FppTest { namespace { // Constant definitions for the state machine signal buffer namespace SmSignalBuffer { // Union for computing the max size of a signal type union SignalTypeUnion { BYTE size_of_FppTest_SmHarness_TestAbsType[FppTest::SmHarness::TestAbsType::SERIALIZED_SIZE]; BYTE size_of_FppTest_SmHarness_TestArray[FppTest::SmHarness::TestArray::SERIALIZED_SIZE]; BYTE size_of_FppTest_SmHarness_TestEnum[FppTest::SmHarness::TestEnum::SERIALIZED_SIZE]; BYTE size_of_FppTest_SmHarness_TestStruct[FppTest::SmHarness::TestStruct::SERIALIZED_SIZE]; BYTE size_of_U32[sizeof(U32)]; BYTE size_of_string[Fw::StringBase::STATIC_SERIALIZED_SIZE(80)]; }; // The serialized size static constexpr FwSizeType SERIALIZED_SIZE = 2 * sizeof(FwEnumStoreType) + sizeof(SignalTypeUnion); } enum MsgTypeEnum { SMSTATEQUEUED_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT, INTERNAL_STATE_MACHINE_SIGNAL, }; // Get the max size by constructing a union of the async input, command, and // internal port serialization sizes union BuffUnion { // Size of buffer for internal state machine signals // The internal SmSignalBuffer stores the state machine id, the // signal id, and the signal data BYTE internalSmBufferSize[SmSignalBuffer::SERIALIZED_SIZE]; }; // Define a message buffer class large enough to handle all the // asynchronous inputs to the component class ComponentIpcSerializableBuffer : public Fw::SerializeBufferBase { public: enum { // Offset into data in buffer: Size of message ID and port number DATA_OFFSET = sizeof(FwEnumStoreType) + sizeof(FwIndexType), // Max data size MAX_DATA_SIZE = sizeof(BuffUnion), // Max message size: Size of message id + size of port + max data size SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE }; Fw::Serializable::SizeType getBuffCapacity() const { return sizeof(m_buff); } U8* getBuffAddr() { return m_buff; } const U8* getBuffAddr() const { return m_buff; } private: // Should be the max of all the input ports serialized sizes... U8 m_buff[SERIALIZATION_SIZE]; }; } // ---------------------------------------------------------------------- // Types for internal state machines // ---------------------------------------------------------------------- SmStateQueuedComponentBase::FppTest_SmState_Basic :: FppTest_SmState_Basic(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_Basic :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_Basic :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_Basic :: action_a(Signal signal) { this->m_component.FppTest_SmState_Basic_action_a(this->getId(), signal); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuard :: FppTest_SmState_BasicGuard(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuard :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicGuard :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuard :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicGuard_action_a(this->getId(), signal); } bool SmStateQueuedComponentBase::FppTest_SmState_BasicGuard :: guard_g(Signal signal) const { return this->m_component.FppTest_SmState_BasicGuard_guard_g(this->getId(), signal); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardString :: FppTest_SmState_BasicGuardString(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardString :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicGuardString :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardString :: action_a( Signal signal, const Fw::StringBase& value ) { this->m_component.FppTest_SmState_BasicGuardString_action_a(this->getId(), signal, value); } bool SmStateQueuedComponentBase::FppTest_SmState_BasicGuardString :: guard_g( Signal signal, const Fw::StringBase& value ) const { return this->m_component.FppTest_SmState_BasicGuardString_guard_g(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestAbsType :: FppTest_SmState_BasicGuardTestAbsType(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestAbsType :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestAbsType :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestAbsType :: action_a( Signal signal, const FppTest::SmHarness::TestAbsType& value ) { this->m_component.FppTest_SmState_BasicGuardTestAbsType_action_a(this->getId(), signal, value); } bool SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestAbsType :: guard_g( Signal signal, const FppTest::SmHarness::TestAbsType& value ) const { return this->m_component.FppTest_SmState_BasicGuardTestAbsType_guard_g(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestArray :: FppTest_SmState_BasicGuardTestArray(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestArray :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestArray :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestArray :: action_a( Signal signal, const FppTest::SmHarness::TestArray& value ) { this->m_component.FppTest_SmState_BasicGuardTestArray_action_a(this->getId(), signal, value); } bool SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestArray :: guard_g( Signal signal, const FppTest::SmHarness::TestArray& value ) const { return this->m_component.FppTest_SmState_BasicGuardTestArray_guard_g(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestEnum :: FppTest_SmState_BasicGuardTestEnum(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestEnum :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestEnum :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestEnum :: action_a( Signal signal, const FppTest::SmHarness::TestEnum& value ) { this->m_component.FppTest_SmState_BasicGuardTestEnum_action_a(this->getId(), signal, value); } bool SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestEnum :: guard_g( Signal signal, const FppTest::SmHarness::TestEnum& value ) const { return this->m_component.FppTest_SmState_BasicGuardTestEnum_guard_g(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestStruct :: FppTest_SmState_BasicGuardTestStruct(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestStruct :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestStruct :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestStruct :: action_a( Signal signal, const FppTest::SmHarness::TestStruct& value ) { this->m_component.FppTest_SmState_BasicGuardTestStruct_action_a(this->getId(), signal, value); } bool SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestStruct :: guard_g( Signal signal, const FppTest::SmHarness::TestStruct& value ) const { return this->m_component.FppTest_SmState_BasicGuardTestStruct_guard_g(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardU32 :: FppTest_SmState_BasicGuardU32(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardU32 :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicGuardU32 :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicGuardU32 :: action_a( Signal signal, U32 value ) { this->m_component.FppTest_SmState_BasicGuardU32_action_a(this->getId(), signal, value); } bool SmStateQueuedComponentBase::FppTest_SmState_BasicGuardU32 :: guard_g( Signal signal, U32 value ) const { return this->m_component.FppTest_SmState_BasicGuardU32_guard_g(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicInternal :: FppTest_SmState_BasicInternal(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicInternal :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicInternal :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicInternal :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicInternal_action_a(this->getId(), signal); } SmStateQueuedComponentBase::FppTest_SmState_BasicSelf :: FppTest_SmState_BasicSelf(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicSelf :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicSelf :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicSelf :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicSelf_action_a(this->getId(), signal); } SmStateQueuedComponentBase::FppTest_SmState_BasicString :: FppTest_SmState_BasicString(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicString :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicString :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicString :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicString_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_BasicString :: action_b( Signal signal, const Fw::StringBase& value ) { this->m_component.FppTest_SmState_BasicString_action_b(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicTestAbsType :: FppTest_SmState_BasicTestAbsType(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestAbsType :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicTestAbsType :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestAbsType :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicTestAbsType_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestAbsType :: action_b( Signal signal, const FppTest::SmHarness::TestAbsType& value ) { this->m_component.FppTest_SmState_BasicTestAbsType_action_b(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicTestArray :: FppTest_SmState_BasicTestArray(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestArray :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicTestArray :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestArray :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicTestArray_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestArray :: action_b( Signal signal, const FppTest::SmHarness::TestArray& value ) { this->m_component.FppTest_SmState_BasicTestArray_action_b(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicTestEnum :: FppTest_SmState_BasicTestEnum(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestEnum :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicTestEnum :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestEnum :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicTestEnum_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestEnum :: action_b( Signal signal, const FppTest::SmHarness::TestEnum& value ) { this->m_component.FppTest_SmState_BasicTestEnum_action_b(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicTestStruct :: FppTest_SmState_BasicTestStruct(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestStruct :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicTestStruct :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestStruct :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicTestStruct_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_BasicTestStruct :: action_b( Signal signal, const FppTest::SmHarness::TestStruct& value ) { this->m_component.FppTest_SmState_BasicTestStruct_action_b(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_BasicU32 :: FppTest_SmState_BasicU32(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_BasicU32 :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_BasicU32 :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_BasicU32 :: action_a(Signal signal) { this->m_component.FppTest_SmState_BasicU32_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_BasicU32 :: action_b( Signal signal, U32 value ) { this->m_component.FppTest_SmState_BasicU32_action_b(this->getId(), signal, value); } SmStateQueuedComponentBase::FppTest_SmState_Internal :: FppTest_SmState_Internal(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_Internal :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_Internal :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_Internal :: action_a(Signal signal) { this->m_component.FppTest_SmState_Internal_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_Polymorphism :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_Polymorphism :: getId() const { return static_cast(this->m_id); } SmStateQueuedComponentBase::FppTest_SmState_StateToChild :: FppTest_SmState_StateToChild(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_StateToChild :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_StateToChild :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChild :: action_exitS2(Signal signal) { this->m_component.FppTest_SmState_StateToChild_action_exitS2(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChild :: action_exitS3(Signal signal) { this->m_component.FppTest_SmState_StateToChild_action_exitS3(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChild :: action_a(Signal signal) { this->m_component.FppTest_SmState_StateToChild_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChild :: action_enterS2(Signal signal) { this->m_component.FppTest_SmState_StateToChild_action_enterS2(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChild :: action_enterS3(Signal signal) { this->m_component.FppTest_SmState_StateToChild_action_enterS3(this->getId(), signal); } SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: FppTest_SmState_StateToChoice(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: action_exitS1(Signal signal) { this->m_component.FppTest_SmState_StateToChoice_action_exitS1(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: action_exitS2(Signal signal) { this->m_component.FppTest_SmState_StateToChoice_action_exitS2(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: action_exitS3(Signal signal) { this->m_component.FppTest_SmState_StateToChoice_action_exitS3(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: action_a(Signal signal) { this->m_component.FppTest_SmState_StateToChoice_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: action_enterS1(Signal signal) { this->m_component.FppTest_SmState_StateToChoice_action_enterS1(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: action_enterS2(Signal signal) { this->m_component.FppTest_SmState_StateToChoice_action_enterS2(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: action_enterS3(Signal signal) { this->m_component.FppTest_SmState_StateToChoice_action_enterS3(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: action_enterS4(Signal signal) { this->m_component.FppTest_SmState_StateToChoice_action_enterS4(this->getId(), signal); } bool SmStateQueuedComponentBase::FppTest_SmState_StateToChoice :: guard_g(Signal signal) const { return this->m_component.FppTest_SmState_StateToChoice_guard_g(this->getId(), signal); } SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: FppTest_SmState_StateToSelf(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: action_exitS1(Signal signal) { this->m_component.FppTest_SmState_StateToSelf_action_exitS1(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: action_exitS2(Signal signal) { this->m_component.FppTest_SmState_StateToSelf_action_exitS2(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: action_exitS3(Signal signal) { this->m_component.FppTest_SmState_StateToSelf_action_exitS3(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: action_a(Signal signal) { this->m_component.FppTest_SmState_StateToSelf_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: action_enterS1(Signal signal) { this->m_component.FppTest_SmState_StateToSelf_action_enterS1(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: action_enterS2(Signal signal) { this->m_component.FppTest_SmState_StateToSelf_action_enterS2(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToSelf :: action_enterS3(Signal signal) { this->m_component.FppTest_SmState_StateToSelf_action_enterS3(this->getId(), signal); } SmStateQueuedComponentBase::FppTest_SmState_StateToState :: FppTest_SmState_StateToState(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmState_StateToState :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_exitS1(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_exitS1(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_exitS2(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_exitS2(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_exitS3(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_exitS3(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_a(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_a(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_enterS1(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_enterS1(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_enterS2(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_enterS2(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_enterS3(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_enterS3(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_enterS4(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_enterS4(this->getId(), signal); } void SmStateQueuedComponentBase::FppTest_SmState_StateToState :: action_enterS5(Signal signal) { this->m_component.FppTest_SmState_StateToState_action_enterS5(this->getId(), signal); } SmStateQueuedComponentBase::FppTest_SmStateQueued_Basic :: FppTest_SmStateQueued_Basic(SmStateQueuedComponentBase& component) : m_component(component) { } void SmStateQueuedComponentBase::FppTest_SmStateQueued_Basic :: init(SmStateQueuedComponentBase::SmId smId) { this->initBase(static_cast(smId)); } SmStateQueuedComponentBase::SmId SmStateQueuedComponentBase::FppTest_SmStateQueued_Basic :: getId() const { return static_cast(this->m_id); } void SmStateQueuedComponentBase::FppTest_SmStateQueued_Basic :: action_a(Signal signal) { this->m_component.FppTest_SmStateQueued_Basic_action_a(this->getId(), signal); } // ---------------------------------------------------------------------- // Component initialization // ---------------------------------------------------------------------- void SmStateQueuedComponentBase :: init( FwSizeType queueDepth, FwEnumStoreType instance ) { // Initialize base class Fw::QueuedComponentBase::init(instance); // Initialize state machine instances this->m_stateMachine_basic1.init(SmId::basic1); this->m_stateMachine_basic2.init(SmId::basic2); this->m_stateMachine_smStateBasic1.init(SmId::smStateBasic1); this->m_stateMachine_smStateBasic2.init(SmId::smStateBasic2); this->m_stateMachine_smStateBasicGuard.init(SmId::smStateBasicGuard); this->m_stateMachine_smStateBasicGuardString.init(SmId::smStateBasicGuardString); this->m_stateMachine_smStateBasicGuardTestAbsType.init(SmId::smStateBasicGuardTestAbsType); this->m_stateMachine_smStateBasicGuardTestArray.init(SmId::smStateBasicGuardTestArray); this->m_stateMachine_smStateBasicGuardTestEnum.init(SmId::smStateBasicGuardTestEnum); this->m_stateMachine_smStateBasicGuardTestStruct.init(SmId::smStateBasicGuardTestStruct); this->m_stateMachine_smStateBasicGuardU32.init(SmId::smStateBasicGuardU32); this->m_stateMachine_smStateBasicInternal.init(SmId::smStateBasicInternal); this->m_stateMachine_smStateBasicSelf.init(SmId::smStateBasicSelf); this->m_stateMachine_smStateBasicString.init(SmId::smStateBasicString); this->m_stateMachine_smStateBasicTestAbsType.init(SmId::smStateBasicTestAbsType); this->m_stateMachine_smStateBasicTestArray.init(SmId::smStateBasicTestArray); this->m_stateMachine_smStateBasicTestEnum.init(SmId::smStateBasicTestEnum); this->m_stateMachine_smStateBasicTestStruct.init(SmId::smStateBasicTestStruct); this->m_stateMachine_smStateBasicU32.init(SmId::smStateBasicU32); this->m_stateMachine_smStateInternal.init(SmId::smStateInternal); this->m_stateMachine_smStatePolymorphism.init(SmId::smStatePolymorphism); this->m_stateMachine_smStateStateToChild.init(SmId::smStateStateToChild); this->m_stateMachine_smStateStateToChoice.init(SmId::smStateStateToChoice); this->m_stateMachine_smStateStateToSelf.init(SmId::smStateStateToSelf); this->m_stateMachine_smStateStateToState.init(SmId::smStateStateToState); // Connect input port schedIn for ( FwIndexType port = 0; port < static_cast(this->getNum_schedIn_InputPorts()); port++ ) { this->m_schedIn_InputPort[port].init(); this->m_schedIn_InputPort[port].addCallComp( this, m_p_schedIn_in ); this->m_schedIn_InputPort[port].setPortNum(port); #if FW_OBJECT_NAMES == 1 Fw::ObjectName portName; portName.format( "%s_schedIn_InputPort[%" PRI_FwIndexType "]", this->m_objName.toChar(), port ); this->m_schedIn_InputPort[port].setObjName(portName.toChar()); #endif } // Create the queue Os::Queue::Status qStat = this->createQueue( queueDepth, static_cast(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE) ); FW_ASSERT( Os::Queue::Status::OP_OK == qStat, static_cast(qStat) ); } // ---------------------------------------------------------------------- // Getters for typed input ports // ---------------------------------------------------------------------- Svc::InputSchedPort* SmStateQueuedComponentBase :: get_schedIn_InputPort(FwIndexType portNum) { FW_ASSERT( (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()), static_cast(portNum) ); return &this->m_schedIn_InputPort[portNum]; } // ---------------------------------------------------------------------- // Component construction and destruction // ---------------------------------------------------------------------- SmStateQueuedComponentBase :: SmStateQueuedComponentBase(const char* compName) : Fw::QueuedComponentBase(compName), m_stateMachine_basic1(*this), m_stateMachine_basic2(*this), m_stateMachine_smStateBasic1(*this), m_stateMachine_smStateBasic2(*this), m_stateMachine_smStateBasicGuard(*this), m_stateMachine_smStateBasicGuardString(*this), m_stateMachine_smStateBasicGuardTestAbsType(*this), m_stateMachine_smStateBasicGuardTestArray(*this), m_stateMachine_smStateBasicGuardTestEnum(*this), m_stateMachine_smStateBasicGuardTestStruct(*this), m_stateMachine_smStateBasicGuardU32(*this), m_stateMachine_smStateBasicInternal(*this), m_stateMachine_smStateBasicSelf(*this), m_stateMachine_smStateBasicString(*this), m_stateMachine_smStateBasicTestAbsType(*this), m_stateMachine_smStateBasicTestArray(*this), m_stateMachine_smStateBasicTestEnum(*this), m_stateMachine_smStateBasicTestStruct(*this), m_stateMachine_smStateBasicU32(*this), m_stateMachine_smStateInternal(*this), m_stateMachine_smStatePolymorphism(), m_stateMachine_smStateStateToChild(*this), m_stateMachine_smStateStateToChoice(*this), m_stateMachine_smStateStateToSelf(*this), m_stateMachine_smStateStateToState(*this) { } SmStateQueuedComponentBase :: ~SmStateQueuedComponentBase() { } // ---------------------------------------------------------------------- // Port handler base-class functions for typed input ports // // Call these functions directly to bypass the corresponding ports // ---------------------------------------------------------------------- void SmStateQueuedComponentBase :: schedIn_handlerBase( FwIndexType portNum, U32 context ) { // Make sure port number is valid FW_ASSERT( (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()), static_cast(portNum) ); // Call handler function this->schedIn_handler( portNum, context ); } // ---------------------------------------------------------------------- // State getter functions // ---------------------------------------------------------------------- SmStateQueuedComponentBase::FppTest_SmStateQueued_Basic::State SmStateQueuedComponentBase :: basic1_getState() const { return this->m_stateMachine_basic1.getState(); } SmStateQueuedComponentBase::FppTest_SmStateQueued_Basic::State SmStateQueuedComponentBase :: basic2_getState() const { return this->m_stateMachine_basic2.getState(); } SmStateQueuedComponentBase::FppTest_SmState_Basic::State SmStateQueuedComponentBase :: smStateBasic1_getState() const { return this->m_stateMachine_smStateBasic1.getState(); } SmStateQueuedComponentBase::FppTest_SmState_Basic::State SmStateQueuedComponentBase :: smStateBasic2_getState() const { return this->m_stateMachine_smStateBasic2.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuard::State SmStateQueuedComponentBase :: smStateBasicGuard_getState() const { return this->m_stateMachine_smStateBasicGuard.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardString::State SmStateQueuedComponentBase :: smStateBasicGuardString_getState() const { return this->m_stateMachine_smStateBasicGuardString.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestAbsType::State SmStateQueuedComponentBase :: smStateBasicGuardTestAbsType_getState() const { return this->m_stateMachine_smStateBasicGuardTestAbsType.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestArray::State SmStateQueuedComponentBase :: smStateBasicGuardTestArray_getState() const { return this->m_stateMachine_smStateBasicGuardTestArray.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestEnum::State SmStateQueuedComponentBase :: smStateBasicGuardTestEnum_getState() const { return this->m_stateMachine_smStateBasicGuardTestEnum.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardTestStruct::State SmStateQueuedComponentBase :: smStateBasicGuardTestStruct_getState() const { return this->m_stateMachine_smStateBasicGuardTestStruct.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicGuardU32::State SmStateQueuedComponentBase :: smStateBasicGuardU32_getState() const { return this->m_stateMachine_smStateBasicGuardU32.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicInternal::State SmStateQueuedComponentBase :: smStateBasicInternal_getState() const { return this->m_stateMachine_smStateBasicInternal.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicSelf::State SmStateQueuedComponentBase :: smStateBasicSelf_getState() const { return this->m_stateMachine_smStateBasicSelf.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicString::State SmStateQueuedComponentBase :: smStateBasicString_getState() const { return this->m_stateMachine_smStateBasicString.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicTestAbsType::State SmStateQueuedComponentBase :: smStateBasicTestAbsType_getState() const { return this->m_stateMachine_smStateBasicTestAbsType.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicTestArray::State SmStateQueuedComponentBase :: smStateBasicTestArray_getState() const { return this->m_stateMachine_smStateBasicTestArray.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicTestEnum::State SmStateQueuedComponentBase :: smStateBasicTestEnum_getState() const { return this->m_stateMachine_smStateBasicTestEnum.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicTestStruct::State SmStateQueuedComponentBase :: smStateBasicTestStruct_getState() const { return this->m_stateMachine_smStateBasicTestStruct.getState(); } SmStateQueuedComponentBase::FppTest_SmState_BasicU32::State SmStateQueuedComponentBase :: smStateBasicU32_getState() const { return this->m_stateMachine_smStateBasicU32.getState(); } SmStateQueuedComponentBase::FppTest_SmState_Internal::State SmStateQueuedComponentBase :: smStateInternal_getState() const { return this->m_stateMachine_smStateInternal.getState(); } SmStateQueuedComponentBase::FppTest_SmState_Polymorphism::State SmStateQueuedComponentBase :: smStatePolymorphism_getState() const { return this->m_stateMachine_smStatePolymorphism.getState(); } SmStateQueuedComponentBase::FppTest_SmState_StateToChild::State SmStateQueuedComponentBase :: smStateStateToChild_getState() const { return this->m_stateMachine_smStateStateToChild.getState(); } SmStateQueuedComponentBase::FppTest_SmState_StateToChoice::State SmStateQueuedComponentBase :: smStateStateToChoice_getState() const { return this->m_stateMachine_smStateStateToChoice.getState(); } SmStateQueuedComponentBase::FppTest_SmState_StateToSelf::State SmStateQueuedComponentBase :: smStateStateToSelf_getState() const { return this->m_stateMachine_smStateStateToSelf.getState(); } SmStateQueuedComponentBase::FppTest_SmState_StateToState::State SmStateQueuedComponentBase :: smStateStateToState_getState() const { return this->m_stateMachine_smStateStateToState.getState(); } // ---------------------------------------------------------------------- // Signal send functions // ---------------------------------------------------------------------- void SmStateQueuedComponentBase :: basic1_sendSignal_s() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::basic1, static_cast(FppTest_SmStateQueued_Basic::Signal::s), buffer); // Send the message and handle overflow this->basic1_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: basic2_sendSignal_s() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::basic2, static_cast(FppTest_SmStateQueued_Basic::Signal::s), buffer); // Send the message and handle overflow this->basic2_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasic1_sendSignal_s() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasic1, static_cast(FppTest_SmState_Basic::Signal::s), buffer); // Send the message and handle overflow this->smStateBasic1_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasic2_sendSignal_s() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasic2, static_cast(FppTest_SmState_Basic::Signal::s), buffer); // Send the message and handle overflow this->smStateBasic2_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicGuard_sendSignal_s() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicGuard, static_cast(FppTest_SmState_BasicGuard::Signal::s), buffer); // Send the message and handle overflow this->smStateBasicGuard_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicGuardString_sendSignal_s(const Fw::StringBase& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicGuardString, static_cast(FppTest_SmState_BasicGuardString::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = value.serializeTo(buffer, 80); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicGuardString_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicGuardTestAbsType_sendSignal_s(const FppTest::SmHarness::TestAbsType& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicGuardTestAbsType, static_cast(FppTest_SmState_BasicGuardTestAbsType::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicGuardTestAbsType_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicGuardTestArray_sendSignal_s(const FppTest::SmHarness::TestArray& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicGuardTestArray, static_cast(FppTest_SmState_BasicGuardTestArray::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicGuardTestArray_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicGuardTestEnum_sendSignal_s(const FppTest::SmHarness::TestEnum& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicGuardTestEnum, static_cast(FppTest_SmState_BasicGuardTestEnum::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicGuardTestEnum_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicGuardTestStruct_sendSignal_s(const FppTest::SmHarness::TestStruct& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicGuardTestStruct, static_cast(FppTest_SmState_BasicGuardTestStruct::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicGuardTestStruct_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicGuardU32_sendSignal_s(U32 value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicGuardU32, static_cast(FppTest_SmState_BasicGuardU32::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicGuardU32_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicInternal_sendSignal_s() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicInternal, static_cast(FppTest_SmState_BasicInternal::Signal::s), buffer); // Send the message and handle overflow this->smStateBasicInternal_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicSelf_sendSignal_s() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicSelf, static_cast(FppTest_SmState_BasicSelf::Signal::s), buffer); // Send the message and handle overflow this->smStateBasicSelf_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicString_sendSignal_s(const Fw::StringBase& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicString, static_cast(FppTest_SmState_BasicString::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = value.serializeTo(buffer, 80); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicString_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicTestAbsType_sendSignal_s(const FppTest::SmHarness::TestAbsType& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicTestAbsType, static_cast(FppTest_SmState_BasicTestAbsType::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicTestAbsType_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicTestArray_sendSignal_s(const FppTest::SmHarness::TestArray& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicTestArray, static_cast(FppTest_SmState_BasicTestArray::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicTestArray_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicTestEnum_sendSignal_s(const FppTest::SmHarness::TestEnum& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicTestEnum, static_cast(FppTest_SmState_BasicTestEnum::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicTestEnum_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicTestStruct_sendSignal_s(const FppTest::SmHarness::TestStruct& value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicTestStruct, static_cast(FppTest_SmState_BasicTestStruct::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicTestStruct_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateBasicU32_sendSignal_s(U32 value) { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateBasicU32, static_cast(FppTest_SmState_BasicU32::Signal::s), buffer); // Serialize the signal data const Fw::SerializeStatus status = buffer.serializeFrom(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Send the message and handle overflow this->smStateBasicU32_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateInternal_sendSignal_S1_internal() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateInternal, static_cast(FppTest_SmState_Internal::Signal::S1_internal), buffer); // Send the message and handle overflow this->smStateInternal_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateInternal_sendSignal_S2_to_S3() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateInternal, static_cast(FppTest_SmState_Internal::Signal::S2_to_S3), buffer); // Send the message and handle overflow this->smStateInternal_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStatePolymorphism_sendSignal_poly() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStatePolymorphism, static_cast(FppTest_SmState_Polymorphism::Signal::poly), buffer); // Send the message and handle overflow this->smStatePolymorphism_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStatePolymorphism_sendSignal_S2_to_S3() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStatePolymorphism, static_cast(FppTest_SmState_Polymorphism::Signal::S2_to_S3), buffer); // Send the message and handle overflow this->smStatePolymorphism_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToChild_sendSignal_S1_to_S2() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToChild, static_cast(FppTest_SmState_StateToChild::Signal::S1_to_S2), buffer); // Send the message and handle overflow this->smStateStateToChild_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToChild_sendSignal_S2_to_S3() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToChild, static_cast(FppTest_SmState_StateToChild::Signal::S2_to_S3), buffer); // Send the message and handle overflow this->smStateStateToChild_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToChoice_sendSignal_S1_to_S4() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToChoice, static_cast(FppTest_SmState_StateToChoice::Signal::S1_to_S4), buffer); // Send the message and handle overflow this->smStateStateToChoice_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToChoice_sendSignal_S1_to_C() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToChoice, static_cast(FppTest_SmState_StateToChoice::Signal::S1_to_C), buffer); // Send the message and handle overflow this->smStateStateToChoice_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToChoice_sendSignal_S2_to_S3() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToChoice, static_cast(FppTest_SmState_StateToChoice::Signal::S2_to_S3), buffer); // Send the message and handle overflow this->smStateStateToChoice_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToSelf_sendSignal_S1_to_S1() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToSelf, static_cast(FppTest_SmState_StateToSelf::Signal::S1_to_S1), buffer); // Send the message and handle overflow this->smStateStateToSelf_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToSelf_sendSignal_S2_to_S3() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToSelf, static_cast(FppTest_SmState_StateToSelf::Signal::S2_to_S3), buffer); // Send the message and handle overflow this->smStateStateToSelf_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToState_sendSignal_S1_to_S4() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToState, static_cast(FppTest_SmState_StateToState::Signal::S1_to_S4), buffer); // Send the message and handle overflow this->smStateStateToState_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToState_sendSignal_S1_to_S5() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToState, static_cast(FppTest_SmState_StateToState::Signal::S1_to_S5), buffer); // Send the message and handle overflow this->smStateStateToState_sendSignalFinish(buffer); } void SmStateQueuedComponentBase :: smStateStateToState_sendSignal_S2_to_S3() { ComponentIpcSerializableBuffer buffer; // Serialize the message type, port number, state ID, and signal this->sendSignalStart(SmId::smStateStateToState, static_cast(FppTest_SmState_StateToState::Signal::S2_to_S3), buffer); // Send the message and handle overflow this->smStateStateToState_sendSignalFinish(buffer); } // ---------------------------------------------------------------------- // Message dispatch functions // ---------------------------------------------------------------------- Fw::QueuedComponentBase::MsgDispatchStatus SmStateQueuedComponentBase :: doDispatch() { ComponentIpcSerializableBuffer _msg; FwQueuePriorityType _priority = 0; Os::Queue::Status _msgStatus = this->m_queue.receive( _msg, Os::Queue::NONBLOCKING, _priority ); if (Os::Queue::Status::EMPTY == _msgStatus) { return Fw::QueuedComponentBase::MSG_DISPATCH_EMPTY; } else { FW_ASSERT( _msgStatus == Os::Queue::OP_OK, static_cast(_msgStatus) ); } // Reset to beginning of buffer _msg.resetDeser(); FwEnumStoreType _desMsg = 0; Fw::SerializeStatus _deserStatus = _msg.deserializeTo(_desMsg); FW_ASSERT( _deserStatus == Fw::FW_SERIALIZE_OK, static_cast(_deserStatus) ); MsgTypeEnum _msgType = static_cast(_desMsg); if (_msgType == SMSTATEQUEUED_COMPONENT_EXIT) { return MSG_DISPATCH_EXIT; } FwIndexType portNum = 0; _deserStatus = _msg.deserializeTo(portNum); FW_ASSERT( _deserStatus == Fw::FW_SERIALIZE_OK, static_cast(_deserStatus) ); switch (_msgType) { // Handle signals to internal state machines case INTERNAL_STATE_MACHINE_SIGNAL: this->smDispatch(_msg); break; default: return MSG_DISPATCH_ERROR; } return MSG_DISPATCH_OK; } // ---------------------------------------------------------------------- // Helper functions for dispatching current messages // ---------------------------------------------------------------------- Fw::QueuedComponentBase::MsgDispatchStatus SmStateQueuedComponentBase :: dispatchCurrentMessages() { // Dispatch all current messages unless ERROR or EXIT occur const FwSizeType currentMessageCount = this->m_queue.getMessagesAvailable(); MsgDispatchStatus messageStatus = MsgDispatchStatus::MSG_DISPATCH_EMPTY; for (FwSizeType i = 0; i < currentMessageCount; i++) { messageStatus = this->doDispatch(); if (messageStatus != QueuedComponentBase::MSG_DISPATCH_OK) { break; } } return messageStatus; } // ---------------------------------------------------------------------- // Calls for messages received on typed input ports // ---------------------------------------------------------------------- void SmStateQueuedComponentBase :: m_p_schedIn_in( Fw::PassiveComponentBase* callComp, FwIndexType portNum, U32 context ) { FW_ASSERT(callComp); SmStateQueuedComponentBase* compPtr = static_cast(callComp); compPtr->schedIn_handlerBase( portNum, context ); } // ---------------------------------------------------------------------- // Send signal helper functions // ---------------------------------------------------------------------- void SmStateQueuedComponentBase :: sendSignalStart( SmId smId, FwEnumStoreType signal, Fw::SerializeBufferBase& buffer ) { Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; // Serialize the message type status = buffer.serializeFrom(static_cast(INTERNAL_STATE_MACHINE_SIGNAL)); FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the port number status = buffer.serializeFrom(static_cast(0)); FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the state machine ID status = buffer.serializeFrom(static_cast(smId)); FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the signal status = buffer.serializeFrom(static_cast(signal)); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); } void SmStateQueuedComponentBase :: basic1_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: basic2_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasic1_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 1, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasic2_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 2, _block); if (qStatus == Os::Queue::Status::FULL) { this->incNumMsgDropped(); return; } FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicGuard_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::BLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 2, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicGuardString_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 3, _block); if (qStatus == Os::Queue::Status::FULL) { this->incNumMsgDropped(); return; } FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicGuardTestAbsType_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 4, _block); if (qStatus == Os::Queue::Status::FULL) { // Deserialize the state machine ID and signal FwEnumStoreType smId; FwEnumStoreType signal; SmStateQueuedComponentBase::deserializeSmIdAndSignal(buffer, smId, signal); // Call the overflow hook this->smStateBasicGuardTestAbsType_stateMachineOverflowHook(static_cast(smId), signal, buffer); // Continue execution return; } FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicGuardTestArray_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicGuardTestEnum_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicGuardTestStruct_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicGuardU32_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicInternal_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicSelf_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicString_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicTestAbsType_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicTestArray_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicTestEnum_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicTestStruct_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateBasicU32_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateInternal_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStatePolymorphism_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateStateToChild_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateStateToChoice_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateStateToSelf_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } void SmStateQueuedComponentBase :: smStateStateToState_sendSignalFinish(Fw::SerializeBufferBase& buffer) { // Send message Os::Queue::BlockingType _block = Os::Queue::NONBLOCKING; Os::Queue::Status qStatus = this->m_queue.send(buffer, 0, _block); FW_ASSERT( qStatus == Os::Queue::OP_OK, static_cast(qStatus) ); } // ---------------------------------------------------------------------- // Helper functions for state machine dispatch // ---------------------------------------------------------------------- void SmStateQueuedComponentBase :: smDispatch(Fw::SerializeBufferBase& buffer) { // Deserialize the state machine ID and signal FwEnumStoreType storedSmId; FwEnumStoreType storedSignal; SmStateQueuedComponentBase::deserializeSmIdAndSignal(buffer, storedSmId, storedSignal); // Select the target state machine instance const SmId smId = static_cast(storedSmId); switch (smId) { case SmId::basic1: { const FppTest_SmStateQueued_Basic::Signal signal = static_cast(storedSignal); this->FppTest_SmStateQueued_Basic_smDispatch(buffer, this->m_stateMachine_basic1, signal); break; } case SmId::basic2: { const FppTest_SmStateQueued_Basic::Signal signal = static_cast(storedSignal); this->FppTest_SmStateQueued_Basic_smDispatch(buffer, this->m_stateMachine_basic2, signal); break; } case SmId::smStateBasic1: { const FppTest_SmState_Basic::Signal signal = static_cast(storedSignal); this->FppTest_SmState_Basic_smDispatch(buffer, this->m_stateMachine_smStateBasic1, signal); break; } case SmId::smStateBasic2: { const FppTest_SmState_Basic::Signal signal = static_cast(storedSignal); this->FppTest_SmState_Basic_smDispatch(buffer, this->m_stateMachine_smStateBasic2, signal); break; } case SmId::smStateBasicGuard: { const FppTest_SmState_BasicGuard::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicGuard_smDispatch(buffer, this->m_stateMachine_smStateBasicGuard, signal); break; } case SmId::smStateBasicGuardString: { const FppTest_SmState_BasicGuardString::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicGuardString_smDispatch(buffer, this->m_stateMachine_smStateBasicGuardString, signal); break; } case SmId::smStateBasicGuardTestAbsType: { const FppTest_SmState_BasicGuardTestAbsType::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicGuardTestAbsType_smDispatch(buffer, this->m_stateMachine_smStateBasicGuardTestAbsType, signal); break; } case SmId::smStateBasicGuardTestArray: { const FppTest_SmState_BasicGuardTestArray::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicGuardTestArray_smDispatch(buffer, this->m_stateMachine_smStateBasicGuardTestArray, signal); break; } case SmId::smStateBasicGuardTestEnum: { const FppTest_SmState_BasicGuardTestEnum::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicGuardTestEnum_smDispatch(buffer, this->m_stateMachine_smStateBasicGuardTestEnum, signal); break; } case SmId::smStateBasicGuardTestStruct: { const FppTest_SmState_BasicGuardTestStruct::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicGuardTestStruct_smDispatch(buffer, this->m_stateMachine_smStateBasicGuardTestStruct, signal); break; } case SmId::smStateBasicGuardU32: { const FppTest_SmState_BasicGuardU32::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicGuardU32_smDispatch(buffer, this->m_stateMachine_smStateBasicGuardU32, signal); break; } case SmId::smStateBasicInternal: { const FppTest_SmState_BasicInternal::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicInternal_smDispatch(buffer, this->m_stateMachine_smStateBasicInternal, signal); break; } case SmId::smStateBasicSelf: { const FppTest_SmState_BasicSelf::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicSelf_smDispatch(buffer, this->m_stateMachine_smStateBasicSelf, signal); break; } case SmId::smStateBasicString: { const FppTest_SmState_BasicString::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicString_smDispatch(buffer, this->m_stateMachine_smStateBasicString, signal); break; } case SmId::smStateBasicTestAbsType: { const FppTest_SmState_BasicTestAbsType::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicTestAbsType_smDispatch(buffer, this->m_stateMachine_smStateBasicTestAbsType, signal); break; } case SmId::smStateBasicTestArray: { const FppTest_SmState_BasicTestArray::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicTestArray_smDispatch(buffer, this->m_stateMachine_smStateBasicTestArray, signal); break; } case SmId::smStateBasicTestEnum: { const FppTest_SmState_BasicTestEnum::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicTestEnum_smDispatch(buffer, this->m_stateMachine_smStateBasicTestEnum, signal); break; } case SmId::smStateBasicTestStruct: { const FppTest_SmState_BasicTestStruct::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicTestStruct_smDispatch(buffer, this->m_stateMachine_smStateBasicTestStruct, signal); break; } case SmId::smStateBasicU32: { const FppTest_SmState_BasicU32::Signal signal = static_cast(storedSignal); this->FppTest_SmState_BasicU32_smDispatch(buffer, this->m_stateMachine_smStateBasicU32, signal); break; } case SmId::smStateInternal: { const FppTest_SmState_Internal::Signal signal = static_cast(storedSignal); this->FppTest_SmState_Internal_smDispatch(buffer, this->m_stateMachine_smStateInternal, signal); break; } case SmId::smStatePolymorphism: { const FppTest_SmState_Polymorphism::Signal signal = static_cast(storedSignal); this->FppTest_SmState_Polymorphism_smDispatch(buffer, this->m_stateMachine_smStatePolymorphism, signal); break; } case SmId::smStateStateToChild: { const FppTest_SmState_StateToChild::Signal signal = static_cast(storedSignal); this->FppTest_SmState_StateToChild_smDispatch(buffer, this->m_stateMachine_smStateStateToChild, signal); break; } case SmId::smStateStateToChoice: { const FppTest_SmState_StateToChoice::Signal signal = static_cast(storedSignal); this->FppTest_SmState_StateToChoice_smDispatch(buffer, this->m_stateMachine_smStateStateToChoice, signal); break; } case SmId::smStateStateToSelf: { const FppTest_SmState_StateToSelf::Signal signal = static_cast(storedSignal); this->FppTest_SmState_StateToSelf_smDispatch(buffer, this->m_stateMachine_smStateStateToSelf, signal); break; } case SmId::smStateStateToState: { const FppTest_SmState_StateToState::Signal signal = static_cast(storedSignal); this->FppTest_SmState_StateToState_smDispatch(buffer, this->m_stateMachine_smStateStateToState, signal); break; } default: FW_ASSERT(0, static_cast(smId)); break; } } void SmStateQueuedComponentBase :: deserializeSmIdAndSignal( Fw::SerializeBufferBase& buffer, FwEnumStoreType& smId, FwEnumStoreType& signal ) { // Move deserialization beyond the message type and port number Fw::SerializeStatus status = buffer.moveDeserToOffset(ComponentIpcSerializableBuffer::DATA_OFFSET); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Deserialize the state machine ID status = buffer.deserializeTo(smId); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Deserialize the signal status = buffer.deserializeTo(signal); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); } void SmStateQueuedComponentBase :: FppTest_SmState_Basic_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_Basic& sm, FppTest_SmState_Basic::Signal signal ) { switch (signal) { case FppTest_SmState_Basic::Signal::s: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicGuard_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicGuard& sm, FppTest_SmState_BasicGuard::Signal signal ) { switch (signal) { case FppTest_SmState_BasicGuard::Signal::s: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicGuardString_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicGuardString& sm, FppTest_SmState_BasicGuardString::Signal signal ) { switch (signal) { case FppTest_SmState_BasicGuardString::Signal::s: { // Deserialize the data char __fprime_ac_value_buffer[Fw::StringBase::BUFFER_SIZE(80)]; Fw::ExternalString value(__fprime_ac_value_buffer, sizeof __fprime_ac_value_buffer); const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicGuardTestAbsType_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicGuardTestAbsType& sm, FppTest_SmState_BasicGuardTestAbsType::Signal signal ) { switch (signal) { case FppTest_SmState_BasicGuardTestAbsType::Signal::s: { // Deserialize the data FppTest::SmHarness::TestAbsType value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicGuardTestArray_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicGuardTestArray& sm, FppTest_SmState_BasicGuardTestArray::Signal signal ) { switch (signal) { case FppTest_SmState_BasicGuardTestArray::Signal::s: { // Deserialize the data FppTest::SmHarness::TestArray value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicGuardTestEnum_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicGuardTestEnum& sm, FppTest_SmState_BasicGuardTestEnum::Signal signal ) { switch (signal) { case FppTest_SmState_BasicGuardTestEnum::Signal::s: { // Deserialize the data FppTest::SmHarness::TestEnum value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicGuardTestStruct_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicGuardTestStruct& sm, FppTest_SmState_BasicGuardTestStruct::Signal signal ) { switch (signal) { case FppTest_SmState_BasicGuardTestStruct::Signal::s: { // Deserialize the data FppTest::SmHarness::TestStruct value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicGuardU32_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicGuardU32& sm, FppTest_SmState_BasicGuardU32::Signal signal ) { switch (signal) { case FppTest_SmState_BasicGuardU32::Signal::s: { // Deserialize the data U32 value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicInternal_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicInternal& sm, FppTest_SmState_BasicInternal::Signal signal ) { switch (signal) { case FppTest_SmState_BasicInternal::Signal::s: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicSelf_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicSelf& sm, FppTest_SmState_BasicSelf::Signal signal ) { switch (signal) { case FppTest_SmState_BasicSelf::Signal::s: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicString_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicString& sm, FppTest_SmState_BasicString::Signal signal ) { switch (signal) { case FppTest_SmState_BasicString::Signal::s: { // Deserialize the data char __fprime_ac_value_buffer[Fw::StringBase::BUFFER_SIZE(80)]; Fw::ExternalString value(__fprime_ac_value_buffer, sizeof __fprime_ac_value_buffer); const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicTestAbsType_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicTestAbsType& sm, FppTest_SmState_BasicTestAbsType::Signal signal ) { switch (signal) { case FppTest_SmState_BasicTestAbsType::Signal::s: { // Deserialize the data FppTest::SmHarness::TestAbsType value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicTestArray_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicTestArray& sm, FppTest_SmState_BasicTestArray::Signal signal ) { switch (signal) { case FppTest_SmState_BasicTestArray::Signal::s: { // Deserialize the data FppTest::SmHarness::TestArray value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicTestEnum_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicTestEnum& sm, FppTest_SmState_BasicTestEnum::Signal signal ) { switch (signal) { case FppTest_SmState_BasicTestEnum::Signal::s: { // Deserialize the data FppTest::SmHarness::TestEnum value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicTestStruct_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicTestStruct& sm, FppTest_SmState_BasicTestStruct::Signal signal ) { switch (signal) { case FppTest_SmState_BasicTestStruct::Signal::s: { // Deserialize the data FppTest::SmHarness::TestStruct value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_BasicU32_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_BasicU32& sm, FppTest_SmState_BasicU32::Signal signal ) { switch (signal) { case FppTest_SmState_BasicU32::Signal::s: { // Deserialize the data U32 value; const Fw::SerializeStatus status = buffer.deserializeTo(value); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(value); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_Internal_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_Internal& sm, FppTest_SmState_Internal::Signal signal ) { switch (signal) { case FppTest_SmState_Internal::Signal::S1_internal: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S1_internal sm.sendSignal_S1_internal(); break; } case FppTest_SmState_Internal::Signal::S2_to_S3: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S2_to_S3 sm.sendSignal_S2_to_S3(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_Polymorphism_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_Polymorphism& sm, FppTest_SmState_Polymorphism::Signal signal ) { switch (signal) { case FppTest_SmState_Polymorphism::Signal::poly: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and poly sm.sendSignal_poly(); break; } case FppTest_SmState_Polymorphism::Signal::S2_to_S3: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S2_to_S3 sm.sendSignal_S2_to_S3(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_StateToChild_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_StateToChild& sm, FppTest_SmState_StateToChild::Signal signal ) { switch (signal) { case FppTest_SmState_StateToChild::Signal::S1_to_S2: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S1_to_S2 sm.sendSignal_S1_to_S2(); break; } case FppTest_SmState_StateToChild::Signal::S2_to_S3: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S2_to_S3 sm.sendSignal_S2_to_S3(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_StateToChoice_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_StateToChoice& sm, FppTest_SmState_StateToChoice::Signal signal ) { switch (signal) { case FppTest_SmState_StateToChoice::Signal::S1_to_S4: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S1_to_S4 sm.sendSignal_S1_to_S4(); break; } case FppTest_SmState_StateToChoice::Signal::S1_to_C: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S1_to_C sm.sendSignal_S1_to_C(); break; } case FppTest_SmState_StateToChoice::Signal::S2_to_S3: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S2_to_S3 sm.sendSignal_S2_to_S3(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_StateToSelf_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_StateToSelf& sm, FppTest_SmState_StateToSelf::Signal signal ) { switch (signal) { case FppTest_SmState_StateToSelf::Signal::S1_to_S1: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S1_to_S1 sm.sendSignal_S1_to_S1(); break; } case FppTest_SmState_StateToSelf::Signal::S2_to_S3: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S2_to_S3 sm.sendSignal_S2_to_S3(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmState_StateToState_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmState_StateToState& sm, FppTest_SmState_StateToState::Signal signal ) { switch (signal) { case FppTest_SmState_StateToState::Signal::S1_to_S4: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S1_to_S4 sm.sendSignal_S1_to_S4(); break; } case FppTest_SmState_StateToState::Signal::S1_to_S5: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S1_to_S5 sm.sendSignal_S1_to_S5(); break; } case FppTest_SmState_StateToState::Signal::S2_to_S3: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and S2_to_S3 sm.sendSignal_S2_to_S3(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } void SmStateQueuedComponentBase :: FppTest_SmStateQueued_Basic_smDispatch( Fw::SerializeBufferBase& buffer, FppTest_SmStateQueued_Basic& sm, FppTest_SmStateQueued_Basic::Signal signal ) { switch (signal) { case FppTest_SmStateQueued_Basic::Signal::s: { // Assert no data left in buffer FW_ASSERT(buffer.getBuffLeft() == 0, static_cast(buffer.getBuffLeft())); // Call the sendSignal function for sm and s sm.sendSignal_s(); break; } default: FW_ASSERT(0, static_cast(signal)); break; } } }