The auto anchor communications library is implemented using a background thread to handle the sending and receiving of commands. This means that commands will not block the user interface, and once communications has started, the main application need not worry about the communications.
If the status of the auto anchor changes, this is optionally indicated asyncronously by the StatusChangeFunc function. The application may also choose to regularly poll the status of the auto anchor
Definition in file AutoAnchorComms.h.
Go to the source code of this file.
Data Structures | |
struct | TAnchorStatus |
Stores all of the status information for a particular winch. More... | |
Defines | |
#define | __DLL_EXPORT |
#define | MAX_SW_VERSION_STR_LEN 6 |
#define | MAX_SW_BUILD_DATE_STR_LEN 11 |
#define | MAX_HW_VERSION_STR_LEN 10 |
#define | MAX_UNIT_SERIAL_NO_STR_LEN 10 |
Typedefs | |
typedef void(* | cbFunc )(void *) |
Callback function type used for indicating a change of status. | |
Enumerations | |
enum | TRodeStatus { , rsRope } |
Indicates what type of rode is currently present. More... | |
enum | TWinchDirection { , dMovingDown, dMovingUp, dLast } |
The movement that the gypsy is currently performing. More... | |
enum | TWinchError { , weSensorWiring, weMotorVoltage, weSolenoidUp, weSolenoidDown, weUnderVoltage, weSmallSignal, weExcessiveSignal, weSensorPulseTimeout, weNotInstalled, weUnknown } |
Error conditions that the unit may return. More... | |
enum | TCommandResponse { , cmdFail, cmdInvalidParameters, cmdWaitingResponse, cmdUserCancel } |
Responses to commands. More... | |
enum | TConnectionStatus { , csCommsTimeout, csIOError, csInvalidHandle } |
Possible connection states. More... | |
Functions | |
int __DLL_EXPORT | AAComms_Init (cbFunc StatusChangeFunc, void *CustData, char *PortName, int DisableCommsAckMsg) |
BOOL __DLL_EXPORT | AAComms_Stop (int handle) |
TConnectionStatus __DLL_EXPORT | AAComms_GetConnectionStatus (int handle) |
BOOL __DLL_EXPORT | AAComms_GetStatus (int handle, TAnchorStatus *status) |
TCommandResponse __DLL_EXPORT | AAComms_ClearRode (int handle) |
TCommandResponse __DLL_EXPORT | AAComms_SetMsgRate (int handle, char *MsgName, int interval) |
TCommandResponse __DLL_EXPORT | AAComms_SetWinchSettings (int handle, int AnchorProfile, int ChainGypsyCircumference, int MaxRode) |
TCommandResponse __DLL_EXPORT | AAComms_GetWinchSettings (int handle, int *AnchorProfile, int *ChainGypsyCircumference, int *MaxAnchorProfile, int *MaxRode) |
TCommandResponse __DLL_EXPORT | AAComms_SetDemoMode (int handle, int demo_mode) |
TCommandResponse __DLL_EXPORT | AAComms_GetFirmwareVersion (int handle, char *FirmwareVersion, char *FirmwareBuildDate, char *HWVersion) |
|
Indicates what type of rode is currently present.
Definition at line 48 of file AutoAnchorComms.h. |
|
The movement that the gypsy is currently performing.
Definition at line 54 of file AutoAnchorComms.h. |
|
Error conditions that the unit may return.
Definition at line 62 of file AutoAnchorComms.h. |
|
Responses to commands.
Definition at line 77 of file AutoAnchorComms.h. |
|
Possible connection states.
Definition at line 86 of file AutoAnchorComms.h. |
|
Initialisation function. This function must be called before any of the other functions in the library
|
|
Stop an auto-anchor interface that was previously opened with the AAComms_Init function
|
|
Gets the current status of the auto anchor connection
|
|
Gets the current status of the auto anchor
|
|
Clears the rode to zero To prevent the user interface from locking up each time a command is sent, the function will always return immediately even if the command is not complete. You need to keep polling the function to discover when the command finishes (or fails).
|
|
Use this function to set NMEA message rates. To prevent the user interface from locking up each time a command is sent, the function will always return immediately even if the command is not complete. You need to keep polling the function to discover when the command finishes (or fails).
|
|
Sets the winch settings To prevent the user interface from locking up each time a command is sent, the function will always return immediately even if the command is not complete. You need to keep polling the function to discover when the command finishes (or fails).
|
|
Reads the winch settings To prevent the user interface from locking up each time a command is sent, the function will always return immediately even if the command is not complete. You need to keep polling the function to discover when the command finishes (or fails).
|
|
Use this function to enable or disable demo mode To prevent the user interface from locking up each time a command is sent, the function will always return immediately even if the command is not complete. You need to keep polling the function to discover when the command finishes (or fails).
|
|
Reads the software and firmware versions from the device To prevent the user interface from locking up each time a command is sent, the function will always return immediately even if the command is not complete. You need to keep polling the function to discover when the command finishes (or fails).
|