18#include <boost/function.hpp>
22class DtRadioEventProcessor;
37constexpr const char*
radios =
"radios";
94 virtual void tick(
double dt)
override {};
103 virtual const char*
type()
const override;
Type-specific handle class for attributes.
Definition attributeHandle.h:229
Table-based access to Lua state for configuration data.
Definition initializer.h:38
Base class for all role components in VR-Engage.
Definition playerComponent.h:102
virtual DtPlayerStation & player()
Gets the player station.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
void handleCycleAudioChannel(MenuActionMessage *msg)
Cycles through available audio channel options (LEFT/CENTER/RIGHT)
DtAttributeHandleType< std::string > myCurrentModulationMajorAttr
Handle for the current modulation major value attribute.
Definition radioLogic.h:304
virtual ~DtRadioLogic() override
Virtual destructor for DtRadioLogic.
DtAttributeHandleType< std::string > myCurrentFrequencyHoppingAttr
Handle for the current frequency hopping state attribute.
Definition radioLogic.h:310
std::string currentCryptoKey() const
Gets the cryptographic key of the current radio.
void updateAttributes()
Updates state attributes with current radio settings.
void handleCryptoKeyInput(const MenuActionMessage *msg)
Sets the crypto key based on input from a menu.
void handleCycleModulationSystem(MenuActionMessage *msg)
Cycles through available modulation system types.
DtInputLogic myInputLogic
Input logic for handling push-to-talk and other input actions.
Definition radioLogic.h:260
std::string currentModulationMajor() const
Gets the major modulation type of the current radio.
virtual const char * type() const override
Returns the type identifier for this component.
std::string currentCryptoSystem() const
Gets the cryptographic system of the current radio.
void setCryptoKey(unsigned short cryptoKey) const
Sets the cryptographic key for the current radio.
void handleEmbarkedOnChanged(const DtEntityIdentifier &val)
Handles changes to the player's embarked state.
DtAttributeHandleType< bool > myCurrentRadioTransmittingAttr
Handle for the current radio transmit state attribute.
Definition radioLogic.h:319
void handleCycleFrequencyHopping(MenuActionMessage *msg)
Toggles frequency hopping on/off.
void handleCycleModulationDetail(MenuActionMessage *msg)
Cycles through available modulation detail types.
void handleCycleRadio(MenuActionMessage *msg)
Cycles to the next available radio or turns off if at the last radio.
void updateRadioManager()
Updates the radio manager based on current radio state.
void handleCycleTimeHopping(MenuActionMessage *msg)
Toggles time hopping on/off.
virtual bool postInitialize() override
Performs post-initialization after all components are initialized.
void handleCycleCryptoMode(MenuActionMessage *msg)
Cycles through available cryptographic modes.
void handleCycleCryptoSystem(MenuActionMessage *msg)
Cycles through available cryptographic systems.
std::string currentFrequencyHopping() const
Gets the frequency hopping state of the current radio.
DtVreMessageResult handleRadioMenuMessage(DtVreMessage *msg)
Handles menu messages related to radio operations.
DtAttributeHandleType< std::string > myCurrentCryptoSystemAttr
Handle for the current cryptographic system attribute.
Definition radioLogic.h:292
DtAttributeHandleType< std::string > myCurrentChannelNameAttr
Handle for the current channel name attribute.
Definition radioLogic.h:286
std::string currentPseudoNoise() const
Gets the pseudo-noise state of the current radio.
std::map< std::string, boost::function< void(DtRadioLogic *, MenuActionMessage *)> > myMenuActionMessageFnMap
Map of menu action names to handler functions.
Definition radioLogic.h:265
DtAttributeHandleType< std::string > myCurrentCryptoModeAttr
Handle for the current cryptographic mode attribute.
Definition radioLogic.h:298
std::string currentModulationDetail() const
Gets the modulation detail type of the current radio.
DtAttributeHandleType< std::string > myCurrentCryptoKeyAttr
Handle for the current cryptographic key attribute.
Definition radioLogic.h:295
virtual void shutdown() override
Shuts down the radio logic component.
int myCurrentRadio
Index of the currently selected radio (-1 if no radio selected)
Definition radioLogic.h:257
std::string currentAudioChannel() const
Gets the audio channel of the current radio.
void handleCyclePseudoNoise(MenuActionMessage *msg)
Toggles pseudo-noise on/off.
DtAttributeHandleType< std::string > myCurrentTimeHoppingAttr
Handle for the current time hopping state attribute.
Definition radioLogic.h:313
std::string currentChannelName() const
Gets the channel name of the current radio.
void handleSetRadio(const MenuActionMessage *msg)
Sets the current radio to a specific index.
std::string currentCryptoMode() const
Gets the cryptographic mode of the current radio.
boost::signals2::connection myRadioManagerTickConnection
Connection made to de post tick to tick the radio manager.
Definition radioLogic.h:268
DtRadioLogic()
Constructor for DtRadioLogic.
DtEntityIdentifier myPreviouslyEmbarkedOn
Definition radioLogic.h:276
void handlePushToTalk(float val)
Handles push-to-talk input events.
virtual void tick(double dt) override
Called every frame to update the component state.
Definition radioLogic.h:94
std::string currentRadioName() const
Gets the name of the current radio.
DtAttributeHandleType< std::string > myCurrentModulationDetailAttr
Handle for the current modulation detail value attribute.
Definition radioLogic.h:307
DtAttributeHandleType< std::string > myCurrentModulationSystemAttr
Handle for the current modulation system attribute.
Definition radioLogic.h:301
PttState
Enumeration for push-to-talk state.
Definition radioLogic.h:60
@ PTT_ON
Push-to-talk button is pressed, transmitting.
Definition radioLogic.h:61
@ PTT_OFF
Push-to-talk button is released, not transmitting.
Definition radioLogic.h:62
DtAttributeHandleType< std::string > myCurrentAudioChannelAttr
Handle for the current audio channel attribute.
Definition radioLogic.h:289
DtAttributeHandleType< std::string > myCurrentRadioNameAttr
Handle for the current radio name attribute.
Definition radioLogic.h:280
void handleCycleModulationMajor(MenuActionMessage *msg)
Cycles through available major modulation types.
virtual void ptt(PttState state)
Sets the push-to-talk state for the current radio.
DtAttributeHandleType< int > myCurrentRadioIdAttr
Handle for the current radio identifier attribute.
Definition radioLogic.h:283
virtual void initializeStateAttributes() override
Initializes state attributes for radio communication.
std::string currentModulationSystem() const
Gets the modulation system of the current radio.
DtAttributeHandleType< std::string > myCurrentPseudoNoiseAttr
Handle for the current pseudo-noise state attribute.
Definition radioLogic.h:316
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the radio logic component.
void handleCycleChannel(MenuActionMessage *msg)
Cycles to the next channel on the current radio.
std::string currentTimeHopping() const
Gets the time hopping state of the current radio.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
constexpr const char * defaultRadio
Definition radioLogic.h:34
constexpr const char * radios
Definition radioLogic.h:37
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Definition radioLogic.h:26
!
Definition glsVreMessageUtil.h:50
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
constexpr const char * DtRadioLogicType
Type identifier for DtRadioLogic component.
Definition radioLogic.h:43
Defines the DtPlayerComponent base class for VR-Engage role components.