DCSModulesAPI  1.0.0
DCS sub project containing all the control modules as libraries.
Enumerations | Functions
DCS::Control Namespace Reference

Exposes tilt and rotation stages control parameters. More...

Enumerations

enum  UnitTarget { UnitTarget::ESP301, UnitTarget::PMC8742 }
 Enumerates the diferent devices acessible via COM/USB ports. More...
 

Functions

DCS_API void StartServices (const char *esp301_com="COM3", const char *pmc8742_usb="104D-4000")
 Starts the COM and USB port services. More...
 
DCS_API void StopServices ()
 Stops the COM and USB port services. More...
 
DCS_API void IssueGenericCommand (UnitTarget target, DCS::Utils::BasicString full_command)
 Issue a generic command to the specified target. More...
 
DCS_API DCS::Utils::BasicString IssueGenericCommandResponse (UnitTarget target, DCS::Utils::BasicString full_command)
 Issue a generic command to the specified target, waiting for a response. More...
 

Detailed Description

Exposes tilt and rotation stages control parameters.

Enumeration Type Documentation

Enumerates the diferent devices acessible via COM/USB ports.

Value of components is for identification only. It is not related to the OS COM/USB port id.

Enumerator
ESP301 

The ESP301 rotation stage controller target.

PMC8742 

The PMC8742 tilt stage controller target.

Function Documentation

void DCS::Control::StartServices ( const char *  esp301_com = "COM3",
const char *  pmc8742_usb = "104D-4000" 
)

Starts the COM and USB port services.

This creates a thread responsible for sending commands for all the targets.

Parameters
esp301_comThe com port (or virtual com port) connecting the pc and the ESP301. Default = "COM3".
pmc8742_usbThe usb vid/pid of the PMC8742 controller. Default = "104D-4000".
Todo:
Create a thread for each target. Allowing for simultaneous operation of the stages.
void DCS::Control::StopServices ( )

Stops the COM and USB port services.

This destroys all the context of COM and USB handles and disables remote connection.

Todo:
Clean up motors to a reset state as well.