Skip to content

Commit

Permalink
Merge pull request #15 from RI-SE/feature_addAllClearCommand
Browse files Browse the repository at this point in the history
Added all clear command
  • Loading branch information
LukasWikander committed Oct 6, 2021
2 parents 2473caf + a7a4f56 commit a3e6114
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion iso22133.c
Original file line number Diff line number Diff line change
Expand Up @@ -2475,7 +2475,8 @@ ssize_t encodeOSTMMessage(const ObjectCommandType command, char *ostmDataBuffer,
// Check vs allowed commands
if (!
(command == OBJECT_COMMAND_ARM || command == OBJECT_COMMAND_DISARM
|| command == OBJECT_COMMAND_REMOTE_CONTROL)) {
|| command == OBJECT_COMMAND_REMOTE_CONTROL
|| command == OBJECT_COMMAND_ALL_CLEAR)) {
fprintf(stderr, "OSTM does not support command %u\n", (uint8_t) command);
return -1;
}
Expand Down
5 changes: 3 additions & 2 deletions iso22133.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ typedef struct {
typedef enum {
OBJECT_COMMAND_ARM = 0x02, //!< Request to arm the target object
OBJECT_COMMAND_DISARM = 0x03, //!< Request to disarm the target object
OBJECT_COMMAND_REMOTE_CONTROL = 0x06 //!< Request for remote control of the target object
OBJECT_COMMAND_REMOTE_CONTROL = 0x06, //!< Request for remote control of the target object
OBJECT_COMMAND_ALL_CLEAR = 0x0A //!< Signal that abort no longer necessary
} ObjectCommandType;


Expand All @@ -81,7 +82,7 @@ typedef enum {
CONTROL_CENTER_STATUS_ABORT = 0x02, //!<
CONTROL_CENTER_STATUS_RUNNING = 0x03, //!<
CONTROL_CENTER_STATUS_TEST_DONE = 0x04, //!<
CONTROL_CENTER_STATUS_NORMAL_STOP = 0x05 //!<
CONTROL_CENTER_STATUS_NORMAL_STOP = 0x05 //!<
} ControlCenterStatusType;

#define MONR_EXPECTED_FREQUENCY_HZ 100
Expand Down
6 changes: 4 additions & 2 deletions positioning.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ typedef enum {
OBJECT_STATE_RUNNING,
OBJECT_STATE_POSTRUN,
OBJECT_STATE_ABORTING,
OBJECT_STATE_REMOTE_CONTROL
} ObjectStateType;
OBJECT_STATE_REMOTE_CONTROL,
OBJECT_STATE_PRE_ARMING,
OBJECT_STATE_PRE_RUNNING
} ObjectStateType; // TODO give numbers

/*! Enumeration of ready to arm statuses of an object */
typedef enum {
Expand Down

0 comments on commit a3e6114

Please sign in to comment.