Variables of type DitsParamSysType are used and they have the following elements.
| id | void *. Client data item passed to getRoutine, mGetRoutine and setRoutine. Can be retreived by calling DitsGetParId(). |
|---|---|
| getRoutine | Get parameter routine of type DitsGetRoutineType. Invoked to return the value of the specified parameter. |
| mGetRoutine | Multiple get routine of type DitsMGetRoutineType. Invoked to return the values of a number of parameters. The names are passed in a space separated list. |
| setRoutine | Set parameter routine of type DitsSetRoutineType. Invoked to set the value of a parameter. |
| monMsgHandler | Monitor message handler routine of type DitsMonitorMsgRoutineType. Routine to be called when a monitor message is received. |
| monDisconHandler | Monitor disconnect handler of type DitsMonitorDisconRoutineType. Routine to be called when a task has disconnected. |
| monTidyHandler | Monitor tidyup routine of type DitsMonitorTidyRoutineType. Routine to be called when the task shuts down (from DitsStop). |
| monCheckHandler | Monitor check existance routine of type DitsMonitorCheckRoutineType. Optional routine which is called to check a parameter for which monitoring is requested is valid. Should return an invalid status if the name is not valid. |
| monSizeHandler | Monitor size routine of type DitsMonitorSizeRoutineType. This Routine is is called to return the size which will be needed to send a message containing the named parameter. |
| monGetHandler | Monitor get routine of type DitsMonitorGetRoutineType. Routine is is called to return the value of the named parameter by Sds id. This is only used on rare occasions. |
| sdsDelete | If true, then id represents the top level Sds id of the parameter system. DitsStop will call SdsDelete and SdsFree on this id. (This flag gets around a problem where by there is no shutdown call in the Sdp parameter system. Other parameter systems should set it to 0. |
This routine can be used to set the parameter system or as an inquiry.
| > | new | DitsParamSysType * | If supplied, new parameter system details. If a null pointer is supplied, we don't attempt to change parameter system details. |
|---|---|---|---|
| < | old | DitsParamSysType * | If supplied, we return the
current parameter system details here. If not supplied, ignored.
|
| ! | status | StatusType * | Modified status.
|
typedef DVOID (*DitsMGetRoutineType)( DVOIDP parid, char *names, SdsIdType * argument1, int *delete_flag, StatusType * status);
typedef DVOID (*DitsSetRoutineType)( DVOIDP parid, DCONSTV char * parname, SdsIdType * argument2, StatusType * status);
typedef DVOID (*DitsMonitorMsgRoutineType)( DCONSTV INT32 flags, DCONSTV char *monname, SdsIdType argin, Dits___NetTransIdType *transid, Dits___PathType *path, long int tag, int *complete, StatusType * status);
typedef DVOID (*DitsMonitorDisconRoutineType)( Dits___PathType *path, StatusType * status);
typedef DVOID (*DitsMonitorTidyRoutineType)(StatusType * status);
typedef DVOID (*DitsMonitorCheckRoutineType)(DCONSTV char *parname, StatusType * status);
typedef unsigned long int (*DitsMonitorSizeRoutineType)(DCONSTV char *parname, StatusType * status);
typedef DVOID (*DitsMonitorGetRoutineType)(DCONSTV char *parname, SdsIdType * argument3, StatusType *status);
| > | parid | void * | Contains a copy of the value passed in the id item of the DitsParamSysType structure. |
|---|---|---|---|
| > | parname | const char * | The name of the parameter. Note
that
for the get and monitor messages, the names
_ALL_, _NAMES_ and _LONG_ are reserved.
For MGet messages, the name is a list of
space separated parameter names.
The meaning of the parameter name is specific to the parameter system, but, for example, in the Sdp parameter system, the name is passed to SdsFindByPath(3) with the SDS id being the id item of the DitsParamSysType structure.
|
| _ALL_ | For Get or MGet messages, this requests that the entire parameter system be returned. In this case, an Sds structure with each item representing a parameter value is returned. For monitor messgeas, this indicates all parameter values are to be monitored. |
|---|---|
| _NAMES_ |
Requests that a list of names be returned. In
this case a structure of type SdpNames is returned.
This will contain one item, an array with each of the
names in it. This only applies to Get and Mget messages.
|
| _LONG_ | Set messages only. If the name of the parameter is _LONG_, then the argument structure contains the actual parameter name as well as the value. The first item in the structure is the name and the second is the value. This allows a long parameter value name to be specified in a SET message. To specify long parameter names in Get messages - An MGet message can be used (the list of names need only one value. |
| < | argument1 | SdsIdType * | A SDS ID of a
new SDS structure is return.
It is to contain the requested parameter values in a from
such that scaler parameters can be accessed using the
Arg series of routines.
|
|---|---|---|---|
| > | argument2 | const SdsIdType * | A pointer to an
SDS ID containing the
new value for a parameter.
|
| < | argument3 | SdsIdType * | The SDS ID of
an SDS item who's name is
the name of a parameter and who values is the value
of that parameter. (Note - a flaw exists that there is
no way of indicating if this value should be deleted
by DITS when DITS is finished with it. The SDS id is
passed to SdsFreeId(3) but not to SdsDelete(3).
|
| > | delete_id | int * | If set true, then DITS should delete the SDS structure (and free the ID). Otherwise DITS will leave it. |
| > | monname | const char * | The type of monitor message. One
of
START//FORWARD/ADD/DELETE/CANCEL.
See
DitsInitiateMessage(3) for more details.
|
| > | flags | INT32 | Flags associated with the monitor message.
See
DitsInitiateMessage(3) for more detailss. Possible
values are
|
| DITS_M_REP_MON_LOSS |
cause the reporting of
monitor messages which are lost due to waiting
for buffer empty notification messages to arrive. If
not set, lost messages can be ignored.
|
|---|---|
| DITS_M_SENDCUR |
if a START/FORWARD/ADD monitor
message and you want the
current value of the parameter sent immediately.
|
| > | transid | const Dits___NetTransIdType * | A DITS message transaction id. This can be supplied to the Dits___SendTap() function when sending replies back to the originator of the monitor message. |
|---|---|---|---|
| > | path | const Dits___PathType * | The DITS path to the originator of the monitor message or the disconnecting path. |
| > | tag | long | The tag assoicated with the original message. This is required by Dits___SendTap() when repling to monitor messages. |
| < | complete | int * | Set true to indicate if the transaction is complete. START and FORWARD transactions would normally not complete, ADD/DELETE/CANCEL would normally complete immediately. |
| ! | status | StatusType * | Modified status.
|
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tjf@aaoepp.aao.gov.au