Command Authority Programmer Notes

The Command Authority Checker and the Command Authority Control Station module are two separate programs. The Command Authority Checker is a daemon which runs on only one processor over the network. This program monitors activity from every control station modules. It tracks all users, determines who has command authority, and enforces that authority by updating every user with their current command authority status.

The Command Authority Control Station is a module under the Data Management System. This module not only can be used to monitor all current user's and who has authority over each subsystem. This module can communicate directly to the Command Authority Checker daemon allowing the operator to override and manipulate command authority for all subsystems. The table below is for that module.

 Application Name:

dmsca

 Development Path:

ACS/DMS/dmsca

 Wm_appl =

70

 Wm_winNum =

1

Contents

Form Information
DMS Authority Control = dmsCA
Linking with Command Authority Checker
Command Authority Status
 
Form Infomation

Wm_form[1] = dmsCA
Label = "DMS Authority Control"
 
Objects
 
cac_CmdObj
[1] Command Authority Button -> cmdCB(0)
 
dmsCASysObj
[0] File Menu Button -> wm_fileMenuButtonCB(0)
[2] Display Menu Button -> wm_displayMenuButton(0)
 
dmsCAChoiceObj
None
 
dmsCALabelObj
[1] = NBV Flight, [2] = Left Arm, [3] Right Arm, [4] Grapple Arm,
[5] = Video Arm, [6] = DMS, [7] = Scamp
 
dmsCACmdObj
[0] Tear Away Button -> dmsca_tearCB(0)
[1-7]Button for Browser -> dmsca_ButtonCB
where i is the id of the browser 1 = NBV Flight, 2 = Left Arm, 3 Right Arm, 4 Grapple Arm, 5 = Video Arm, 6 = DMS, 7 = Scamp
 
dmsCACmd1Obj
[1-7] = Browser Objects -> dmsca_browseCB(i)
where i is the id of the browser 1 = NBV Flight, 2 = Left Arm, 3 Right Arm, 4 Grapple Arm, 5 = Video Arm, 6 = DMS, 7 = Scamp
 
dmsCACmd2Obj
[1-7] = Free Button -> dmsca_freeButtonCB(i)
where i is the id of the browser 1 = NBV Flight, 2 = Left Arm, 3 Right Arm, 4 Grapple Arm, 5 = Video Arm, 6 = DMS, 7 = Scamp
 
dmsCATelObj
[1-7] = Command Authority Checker status indicators
where i is the id of the browser 1 = NBV Flight, 2 = Left Arm, 3 Right Arm, 4 Grapple Arm, 5 = Video Arm, 6 = DMS, 7 = Scamp
 

Linking with Command Authority Checker

Developmental Path: ACS/commandCheck

This discription is used by every control system module, which sends commands, to link to the Command Authority Checker daemon. These functions allow the module to communicate with the daemon to request and recieve updates on authority status.

Files Required

 headers cac_ExternalFN.h
 files cac_ExternalFN.c - The interaction functions for command authority
 libraries

libforms.a

libforms.so.0.88 - needed at run time

 
API Functions
 Function Prototype:
void cac_InitCmd(Cmd_Auth_Type_Msg des)
 Description: This function packetizes most of the desired command authority message with information about the process and host.
 Notes: Call during initialization.
 Function Prototype:
void cac_CmdButton(short winnum, short auth, 
        short *cmd,  Cmd_Auth_Type_Msg des)
 Description: This function performs all updates, including button up/down and color changes, to all command authority buttons when a change in authority status occurs. Also this function updates the command authority global and NDDS desired message as deemed approriate by the authority status.
 Notes: Called automatically.
 Function Prototype:
short cac_nddsCB(Cmd_Auth_Type_Msg Des, Cmd_Auth_Type_Msg msg, 
		short *cmd, short oldAuth, short winnum, short *counter)
 Description: This function is called for an incomming actual message from the command checker. It determines any changes in authority status and takes the appropriate actions.
 Notes: Call in the NDDS consumer callback.
 Function Prototype:
void cac_checkForCACDropout(short *counter, short winnum, short *auth, 
			short *cmd, Cmd_Auth_Type_Msg des)
 Description: This function checks to see if a message has been received from the command checker lateley. If not, it is assumed the command checker has lost contact, and removes all command authority.
 Notes: Call in the main event loop.

Command Authority Status

By linking to the Command Checker the Command Authority Buttons can be used to request changes to that modules command authority. There are several authority states which a module can have. The are listed below, the higher the number the greater the command authority. The Command Authority Buttons on all the forms of a module will automatically be updated, changing color and on/off status according to the authority state issued by the Command Checker. The colors of the buttons are described more in the Window Manager Standards Notes.

 State Status  Cmd Authority Button Status  Button Color Off Button Color On
 1  Authorization Taken  OFF MOD_CRASHED_COL MOD_PENDING_COL
 2  Denied Authorization  OFF MOD_CANT_COL MOD_PENDING_COL
 3  Confirmed Authorization Removal Request Not Allowed  OFF MOD_CANT_COL MOD_PENDING_COL
 4  Confirmed Authorization Removal Allowed Request  OFF DEFAULT_COL MOD_PENDING_COL
 5  Authorization Pending  ON MOD_PENDINGOFF_COL MOD_PENDING_COL
 6  Request Authorization Removal  OFF MOD_PENDINGOFF_COL MOD_PENDING_COL
 7  Confirmed Authorization  ON MOD_PENDINGOFF_COL MOD_RUNNING_COL
 8  Forced Authorizaiton  ON MOD_PENDINGOFF_COL MOD_RUNNING_COL