284 lines
13 KiB
C++
284 lines
13 KiB
C++
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// GENERATED CODE - do not edit (Generated by ddkit/genModelMsg)
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Mount.hpp (rmodel-msg)
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <tmsif/type/Mount.hpp>
|
|
#include <tmsif/tmsif_export.hpp>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
|
|
namespace M_Mount {
|
|
|
|
|
|
//
|
|
// Service
|
|
//
|
|
|
|
/// Mount Service interface.
|
|
/// Contains operations that a client can command the Mount Service to perform.
|
|
///
|
|
/// @startuml "Mount State Chart"
|
|
/// hide empty description
|
|
/// top to bottom direction
|
|
///
|
|
/// skinparam StateBorderColor<<internalState>> dimgray
|
|
/// skinparam StateBackgroundColor<<internalState>> white
|
|
/// skinparam StateBorderColor<<ctrlState>> dimgray
|
|
/// skinparam StateBackgroundColor<<ctrlState>> lightcyan
|
|
/// skinparam StateBorderColor<<searchState>> dimgray
|
|
/// skinparam StateBackgroundColor<<searchState>> thistle
|
|
/// skinparam StateBackgroundColor<<sysBorder>> white
|
|
/// skinparam StateBorderColor<<sysBorder>> black
|
|
/// skinparam NoteFontSize<<sysBorder>> 30
|
|
/// skinparam StateBorderColor<<sysBorder>> black
|
|
///
|
|
/// skinparam StateBorderColor<<connector>> transparent
|
|
/// skinparam StateBackgroundColor<<connector>> lightblue
|
|
///
|
|
/// legend top left
|
|
/// <back:beige><font size=20>StabState
|
|
/// <back:lightcyan><font size=20>ControlState
|
|
/// <back:thistle><font size=20>TargetAssignment SearchState
|
|
/// <back:white><font size=20>Internal-State
|
|
/// endlegend
|
|
///
|
|
///
|
|
/// state MOUNT<<sysBorder>>{
|
|
///
|
|
/// [*] --> MOTOR_OFF
|
|
/// note on link
|
|
/// Which mode is actually active
|
|
/// at startup depends on mount and project.
|
|
/// end note
|
|
/// MOTOR_OFF : <b>Notify-Inputs are ignored.
|
|
/// MOTOR_OFF : <back:lightcyan>No control state</back> is reported.
|
|
///
|
|
/// LOCKED : <b>Inputs:
|
|
/// LOCKED : <b>NotifyAngle (if supported by mount)
|
|
/// LOCKED : If NotifyAngle is supported, the
|
|
/// LOCKED : control state <back:lightcyan>Controlled_By_Angle</back>
|
|
/// LOCKED : is reported. Otherwise <back:lightcyan>none</back>.
|
|
///
|
|
/// HORIZONTAL_STAB : <b>Inputs:
|
|
/// HORIZONTAL_STAB : <b>NotifyAngle
|
|
/// HORIZONTAL_STAB : <b>NotifyRateAbsolute/Scaled/Relative
|
|
/// HORIZONTAL_STAB : Whether angle or rate is processed
|
|
/// HORIZONTAL_STAB : depends on most recent input.
|
|
/// HORIZONTAL_STAB : <back:lightcyan>Controlled_By_Rate</back> or <back:lightcyan>Controlled_By_Angle</back>
|
|
/// HORIZONTAL_STAB : are reported as control state accordingly.
|
|
///
|
|
/// state CTRL_MODE_CHOICE<<choice>>
|
|
/// MOUNT --> CTRL_MODE_CHOICE : CmdMode
|
|
///
|
|
/// state UNSTAB{
|
|
/// UNSTAB : <b>Inputs:
|
|
/// UNSTAB : <b>NotifyAngle
|
|
/// UNSTAB : <b>NotifyRateAbsolute/Scaled/Relative
|
|
///
|
|
/// state "CONTROLLED_BY_RATE" as UNSTAB_CONTROLLED_BY_RATE <<ctrlState>>
|
|
/// UNSTAB_CONTROLLED_BY_RATE : <b>Inputs:
|
|
/// UNSTAB_CONTROLLED_BY_RATE : <b>NotifyRateAbsolute/Scaled/Relative
|
|
/// state "CONTROLLED_BY_ANGLE" as UNSTAB_CONTROLLED_BY_ANGLE <<ctrlState>>
|
|
/// UNSTAB_CONTROLLED_BY_ANGLE : <b>Inputs:
|
|
/// UNSTAB_CONTROLLED_BY_ANGLE : <b>NotifyAngle
|
|
///
|
|
///
|
|
/// state UNSTAB_INPUT_CHOICE<<choice>>
|
|
/// [*] --> UNSTAB_INPUT_CHOICE
|
|
/// UNSTAB_INPUT_CHOICE --> UNSTAB_CONTROLLED_BY_ANGLE : [AngleReceivedLast]
|
|
/// UNSTAB_INPUT_CHOICE --> UNSTAB_CONTROLLED_BY_RATE : [RateReceivedLast]
|
|
/// UNSTAB_INPUT_CHOICE --> UNSTAB_CONTROLLED_BY_RATE : [NothingReceivedYet]
|
|
///
|
|
/// UNSTAB_CONTROLLED_BY_RATE --> UNSTAB_CONTROLLED_BY_ANGLE : NotifyAngle
|
|
/// UNSTAB_CONTROLLED_BY_ANGLE --> UNSTAB_CONTROLLED_BY_RATE : NotifyRateAbsolute
|
|
/// UNSTAB_CONTROLLED_BY_ANGLE --> UNSTAB_CONTROLLED_BY_RATE : NotifyRateScaled
|
|
/// UNSTAB_CONTROLLED_BY_ANGLE --> UNSTAB_CONTROLLED_BY_RATE : NotifyRateRelative
|
|
///
|
|
/// state "WIDE_AREA_SCAN" as WIDE_AREA_SCAN <<ctrlState>>
|
|
/// WIDE_AREA_SCAN : <b>Inputs:
|
|
/// WIDE_AREA_SCAN : <b>ConfigWideAreaScanParams
|
|
///
|
|
/// state "SLAVED_TO_LEADING_DEVICE" as SLAVED_TO_LEADING_DEVICE <<ctrlState>>
|
|
/// SLAVED_TO_LEADING_DEVICE : <b>Inputs:
|
|
/// SLAVED_TO_LEADING_DEVICE : <b>ConfigLeadingDevice
|
|
///
|
|
/// }
|
|
///
|
|
///
|
|
///
|
|
///
|
|
/// state STAB{
|
|
/// state STAB_INPUT_CHOICE<<choice>>
|
|
/// [*] --> STAB_INPUT_CHOICE
|
|
/// STAB_INPUT_CHOICE -down-> STAB_CONTROLLED_BY_ANGLE : [AngleReceivedLast]
|
|
/// STAB_INPUT_CHOICE -down-> STAB_CONTROLLED_BY_RATE : [RateReceivedLast]
|
|
/// STAB_INPUT_CHOICE -down-> STAB_CONTROLLED_BY_RATE : [NothingReceivedYet]
|
|
///
|
|
/// STAB_CONTROLLED_BY_RATE --> STAB_CONTROLLED_BY_ANGLE : NotifyAngle
|
|
/// STAB_CONTROLLED_BY_ANGLE --> STAB_CONTROLLED_BY_RATE : NotifyRateAbsolute
|
|
/// STAB_CONTROLLED_BY_ANGLE --> STAB_CONTROLLED_BY_RATE : NotifyRateScaled
|
|
/// STAB_CONTROLLED_BY_ANGLE --> STAB_CONTROLLED_BY_RATE : NotifyRateRelative
|
|
///
|
|
///
|
|
/// state "CONTROLLED_BY_RATE" as STAB_CONTROLLED_BY_RATE <<ctrlState>>
|
|
/// STAB_CONTROLLED_BY_RATE : <b>Inputs:
|
|
/// STAB_CONTROLLED_BY_RATE : <b>NotifyRateAbsolute/Scaled/Relative
|
|
/// state "CONTROLLED_BY_ANGLE" as STAB_CONTROLLED_BY_ANGLE <<ctrlState>>
|
|
/// STAB_CONTROLLED_BY_ANGLE : <b>Inputs:
|
|
/// STAB_CONTROLLED_BY_ANGLE : <b>NotifyAngle
|
|
///
|
|
/// state CONTROLLED_BY_VIDEO_TRACKER<<ctrlState>>{
|
|
/// CONTROLLED_BY_VIDEO_TRACKER : <b>OnExit: GEN( Vt::NotifyLosCtrlMountTrackingState=No_Tracking )
|
|
///
|
|
/// state "CENTERING" as CENTERING <<internalState>>
|
|
/// state "CENTERED" as CENTERED <<internalState>>
|
|
/// state "COASTING" as COASTING <<internalState>>
|
|
///
|
|
/// CENTERING : <b>Notify-Inputs are ignored
|
|
/// CENTERING :
|
|
/// CENTERING : <b>OnEntry: GEN( Vt::NotifyLosCtrlMountTrackingState=Centering )
|
|
/// note right of CENTERING
|
|
/// Optional. Control loop might not have
|
|
/// this intermediate state.
|
|
/// end note
|
|
///
|
|
/// CENTERING --> CENTERED : evVtCtrlCentered
|
|
/// CENTERED : <b>Notify-Inputs are ignored
|
|
/// CENTERED :
|
|
/// CENTERED : <b>OnEntry: GEN( Vt::NotifyLosCtrlMountTrackingState=Centered )
|
|
///
|
|
/// CENTERED --> COASTING : Vt::ReportLosCtrlPosError[Vt::IsRemoved==false && Vt::IsCoasting==true]
|
|
/// COASTING : <b>Inputs:
|
|
/// COASTING : <b>NotifyRateAbsolute/Scaled/Relative (if supported by mount)
|
|
/// COASTING :
|
|
/// COASTING : <b>OnEntry: GEN( Vt::NotifyLosCtrlMountTrackingState=Memory_Track_Video_Tracker )
|
|
/// COASTING --> CENTERING : Vt::ReportLosCtrlPosError[Vt::IsRemoved==false && Vt::IsCoasting==false]
|
|
///
|
|
/// note "Rate variant behaves the same way." as N1
|
|
///
|
|
/// }
|
|
///
|
|
/// note top of CONTROLLED_BY_VIDEO_TRACKER
|
|
/// <font size=20>Depending on mount,
|
|
/// <font size=20>Controlled_By_Video_tracker could
|
|
/// <font size=20>also be placed in UNSTAB.
|
|
/// end note
|
|
///
|
|
/// CONTROLLED_BY_VIDEO_TRACKER --> STAB_INPUT_CHOICE : Vt::ReportLosCtrlPosError[Vt::IsRemoved==true]
|
|
/// STAB --> CENTERING : Vt::ReportLosCtrlPosError[Vt::IsRemoved==false]
|
|
///
|
|
/// state TARGET_ASSIGNMENT<<ctrlState>>{
|
|
/// note "Transitions are taken and states are reported\nregardless of whether the mount supports these\nsearch features." as N3
|
|
///
|
|
/// TARGET_ASSIGNMENT : TgtAssigmentSearchState is <back:thistle>NoSearch</back> outside this state.
|
|
/// TARGET_ASSIGNMENT :
|
|
/// TARGET_ASSIGNMENT : <b>Inputs:
|
|
/// TARGET_ASSIGNMENT : <b>NotifyTgtAssignmentSphere
|
|
/// TARGET_ASSIGNMENT : <b>NotifyTgtAssignmentCart
|
|
/// TARGET_ASSIGNMENT : Whether sphere or cart. position is
|
|
/// TARGET_ASSIGNMENT : processed depends on most recent input.
|
|
///
|
|
/// state "SEARCH_INIT" as SEARCH_INIT <<searchState>>
|
|
/// SEARCH_INIT --> SEARCH_AUTOMATIC : evReachedTgtPos
|
|
/// state "SEARCH_AUTOMATIC" as SEARCH_AUTOMATIC <<searchState>>
|
|
/// SEARCH_AUTOMATIC --> SEARCH_MANUAL : CmdTgtAssigmentSearchAction[Action==Manual_Search]
|
|
/// note on link
|
|
/// Automatic search process is paused.
|
|
/// end note
|
|
/// state "SEARCH_MANUAL" as SEARCH_MANUAL <<searchState>>
|
|
/// SEARCH_MANUAL --> SEARCH_AUTOMATIC : CmdTgtAssigmentSearchAction[Action==AutomaticSearch]
|
|
/// note on link
|
|
/// Automatic search process is resumed.
|
|
/// end note
|
|
///
|
|
/// SEARCH_AUTOMATIC : <b>Additional Inputs:
|
|
/// SEARCH_AUTOMATIC : <b>ConfigTgtAssignmentSearchPattern
|
|
/// SEARCH_MANUAL : <b>Additional Inputs:
|
|
/// SEARCH_MANUAL : <b>NotifyRateAbsolute/Scaled/Relative
|
|
/// }
|
|
///
|
|
/// note top of TARGET_ASSIGNMENT
|
|
/// <font size=20>Depending on mount,
|
|
/// <font size=20>Target_Assignment could
|
|
/// <font size=20>also be placed in UNSTAB.
|
|
/// end note
|
|
///
|
|
/// }
|
|
///
|
|
/// UNSTAB --> CENTERING : Vt::ReportLosCtrlPosError[Vt::IsRemoved==false]
|
|
/// note on link
|
|
/// Support for transition from other
|
|
/// stabmode depends on mount/project.
|
|
/// end note
|
|
///
|
|
/// CTRL_MODE_CHOICE -down-> MOTOR_OFF : [Mode==Motor_Off]
|
|
/// CTRL_MODE_CHOICE -down-> LOCKED : [Mode==Locked]
|
|
/// CTRL_MODE_CHOICE -down-> UNSTAB : [Mode==Unstab]
|
|
/// CTRL_MODE_CHOICE -down-> STAB : [Mode==Stab]
|
|
/// CTRL_MODE_CHOICE -down-> SEARCH_INIT : [Mode==Target_Assignment]
|
|
/// CTRL_MODE_CHOICE -down-> SLAVED_TO_LEADING_DEVICE : [Mode==Slaved_To_Leading_Device]
|
|
/// CTRL_MODE_CHOICE -down-> WIDE_AREA_SCAN : [Mode==Wide_Area_Scan]
|
|
/// CTRL_MODE_CHOICE -down-> HORIZONTAL_STAB : [Mode==Horizontal_Stab]
|
|
/// }
|
|
/// @enduml
|
|
class TMSIF_EXPORT IService {
|
|
|
|
public:
|
|
virtual ~IService();
|
|
virtual void ConfigMaximumRate(M_Common::AngleRateDegreesPerSecOptionalType const& AzimuthRate, M_Common::AngleRateDegreesPerSecOptionalType const& ElevationRate);
|
|
virtual void ConfigInputSource(bool IsClientIdFilterEnabled, M_Common::StringListType const& ClientIds);
|
|
virtual void ConfigTgtAssignmentInputSource(bool IsTgtAssignmentClientIdFilterEnabled, M_Common::StringListType const& TgtAssignmentClientIds);
|
|
virtual void ConfigTgtAssignmentSearchInputSource(bool IsTgtAssignmentSearchClientIdFilterEnabled, M_Common::StringListType const& TgtAssignmentSearchClientIds);
|
|
virtual void ConfigTgtAssignmentSearchPattern(M_Mount::TgtAssignmentSearchPatternType const& SearchPatternParams);
|
|
virtual void ConfigLeadingDevice(M_Common::LongOptionalType const& DeviceId);
|
|
virtual void ConfigSlavedDevice(M_Common::LongOptionalType const& DeviceId);
|
|
virtual void ConfigSlewLimits(M_Mount::AngularLimitType const& SlewLimits);
|
|
virtual void ConfigStorePosition(std::string const& KeyId, M_Common::AngleDegreesType Azimuth, M_Common::AngleDegreesType Elevation, bool IsRemoved);
|
|
virtual void CmdMoveToStoredPosition(std::string const& Id);
|
|
virtual void CmdMode(M_Mount::ModeCommand::Type Mode);
|
|
virtual void CmdTgtAssignmentSearchAction(M_Mount::TgtAssignmentSearchCmdKind::Type Action);
|
|
virtual void CmdAutoDriftCompensation(bool IsEnabled);
|
|
virtual void CmdManualDriftCompensation(M_Common::AngleRateDegreesPerSecType OffsetAzimuthRate, M_Common::AngleRateDegreesPerSecType OffsetElevationRate, bool IsRelative);
|
|
virtual void CmdAllowExternalDriftCompensation(bool IsAllowed);
|
|
virtual void CmdHorizontalAiming(bool IsEnabled);
|
|
virtual void CmdSetOperationalModeRateAid(bool Activate);
|
|
virtual void NotifyAngle(std::string const& InputSourceClientId, M_Common::AngleDegreesType Azimuth, M_Common::AngleDegreesType Elevation, M_Mount::MountAngleParamsType const& AngleParams);
|
|
virtual void NotifyTgtAssignment(std::string const& InputSourceClientId, M_Common::PositionType const& Position, M_Common::LinearVelocityOptionalType const& Velocity, M_Common::TimeType const& Timestamp, M_Mount::MountAngleParamsType const& AngleParams);
|
|
virtual void NotifyRateRelative(std::string const& InputSourceClientId, M_Common::AngleRateDegreesPerSecType AzimuthRate, M_Common::AngleRateDegreesPerSecType ElevationRate);
|
|
virtual void NotifyRateAbsolute(std::string const& InputSourceClientId, M_Common::AngleRateDegreesPerSecType AzimuthRate, M_Common::AngleRateDegreesPerSecType ElevationRate);
|
|
virtual void NotifyRateScaled(std::string const& InputSourceClientId, M_Mount::ScaledRateOptionalType const& ScaledRate);
|
|
};
|
|
|
|
|
|
//
|
|
// Client
|
|
//
|
|
|
|
/// Mount Client interface.
|
|
/// Contains callback operations from the Mount Service to the Client.
|
|
class TMSIF_EXPORT IClient {
|
|
|
|
public:
|
|
virtual ~IClient();
|
|
virtual void ReportMountSettings(M_Mount::MountSettingsType const& Settings);
|
|
virtual void ReportMountStatus(M_Mount::MountStatusType const& Status, bool IsRemoved);
|
|
virtual void ReportMountPosition(M_Mount::MountPositionType const& Pos);
|
|
virtual void ReportTgtAssignmentSearchOffset(M_Common::SphericalPositionType const& Offset);
|
|
virtual void ReportTgtAssignmentPosition(M_Common::PositionType const& Position);
|
|
virtual void ReportTgtAssignmentVelocity(M_Common::LinearVelocityOptionalType const& Velocity);
|
|
};
|
|
|
|
|
|
} // namespace M_Mount
|
|
|
|
|