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;
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:78
virtual DtPlayerStation & player()
Gets the player station.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
std::string currentModulationSystem()
Gets the modulation system of the current radio.
void setCryptoKey(unsigned short cryptoKey)
Sets the cryptographic key for the current radio.
virtual ~DtRadioLogic() override
Virtual destructor for DtRadioLogic.
void updateAttributes()
Updates state attributes with current radio settings.
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
virtual const char * type() const override
Returns the type identifier for this component.
std::string currentModulationMajor()
Gets the major modulation type of the current radio.
std::string currentCryptoMode()
Gets the cryptographic mode of the current radio.
void handleCycleFrequencyHopping(MenuActionMessage *msg)
Toggles frequency hopping on/off.
void handleCycleModulationDetail(MenuActionMessage *msg)
Cycles through available modulation detail types.
std::string currentModulationDetail()
Gets the modulation detail type of the current radio.
void handleCycleRadio(MenuActionMessage *msg)
Cycles to the next available radio or turns off if at the last radio.
void handleCryptoKeyInput(MenuActionMessage *msg)
Sets the crypto key based on input from a menu.
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.
DtVreMessageResult handleRadioMenuMessage(DtVreMessage *msg)
Handles menu messages related to radio operations.
std::string currentCryptoSystem()
Gets the cryptographic system of the current radio.
std::string currentCryptoKey()
Gets the cryptographic key 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
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
void handleCycleDuplex(MenuActionMessage *msg)
Cycles through available duplex modes (FULL/HALF)
void handleCyclePseudoNoise(MenuActionMessage *msg)
Toggles pseudo-noise on/off.
void handleEmbarkedOnChanged(DtEntityIdentifier val)
Handles changes to the player's embarked state.
std::string currentRadioName()
Gets the name 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
std::string currentPseudoNoise()
Gets the pseudo-noise state of the current radio.
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
void handleSetRadio(MenuActionMessage *msg)
Sets the current radio to a specific index.
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
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.
virtual void initializeStateAttributes() override
Initializes state attributes for radio communication.
std::string currentTimeHopping()
Gets the time hopping state of the current radio.
std::string currentFrequencyHopping()
Gets the frequency hopping state of the current radio.
std::string currentDuplex()
Gets the duplex mode of the current radio.
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the radio logic component.
std::string currentChannelName()
Gets the channel name of the current radio.
void handleCycleChannel(MenuActionMessage *msg)
Cycles to the next channel on 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
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
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.