|
Instrument Neutral Distributed Interface INDI
0.9.6
|
Functions | |
| IText * | IUFindText (const ITextVectorProperty *tvp, const char *name) |
| Find an IText member in a vector text property. | |
| INumber * | IUFindNumber (const INumberVectorProperty *nvp, const char *name) |
| Find an INumber member in a number text property. | |
| ISwitch * | IUFindSwitch (const ISwitchVectorProperty *svp, const char *name) |
| Find an ISwitch member in a vector switch property. | |
| ILight * | IUFindLight (const ILightVectorProperty *lvp, const char *name) |
| Find an ILight member in a vector Light property. | |
| IBLOB * | IUFindBLOB (const IBLOBVectorProperty *bvp, const char *name) |
| Find an IBLOB member in a vector BLOB property. | |
| ISwitch * | IUFindOnSwitch (const ISwitchVectorProperty *sp) |
| Returns the first ON switch it finds in the vector switch property. | |
| int | IUFindOnSwitchIndex (const ISwitchVectorProperty *sp) |
| Returns the index of first ON switch it finds in the vector switch property. | |
| void | IUResetSwitch (ISwitchVectorProperty *svp) |
| Reset all switches in a switch vector property to OFF. | |
| int | IUUpdateSwitch (ISwitchVectorProperty *svp, ISState *states, char *names[], int n) |
| Update all switches in a switch vector property. | |
| int | IUUpdateNumber (INumberVectorProperty *nvp, double values[], char *names[], int n) |
| Update all numbers in a number vector property. | |
| int | IUUpdateText (ITextVectorProperty *tvp, char *texts[], char *names[], int n) |
| Update all text members in a text vector property. | |
| int | IUUpdateBLOB (IBLOBVectorProperty *bvp, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n) |
| Update all BLOB members in a BLOB vector property. | |
| int | IUSaveBLOB (IBLOB *bp, int size, int blobsize, char *blob, char *format) |
| Function to save blob metadata in the corresponding blob. | |
| void | IUUpdateMinMax (const INumberVectorProperty *nvp) |
| Function to update the min and max elements of a number in the client. | |
| void | IUSaveText (IText *tp, const char *newtext) |
| Function to reliably save new text in a IText. | |
| void | IUFillSwitch (ISwitch *sp, const char *name, const char *label, ISState s) |
| Assign attributes for a switch property. The switch's auxiliary elements will be set to NULL. | |
| void | IUFillLight (ILight *lp, const char *name, const char *label, IPState s) |
| Assign attributes for a light property. The light's auxiliary elements will be set to NULL. | |
| void | IUFillNumber (INumber *np, const char *name, const char *label, const char *format, double min, double max, double step, double value) |
| Assign attributes for a number property. The number's auxiliary elements will be set to NULL. | |
| void | IUFillText (IText *tp, const char *name, const char *label, const char *initialText) |
| Assign attributes for a text property. The text's auxiliary elements will be set to NULL. | |
| void | IUFillBLOB (IBLOB *bp, const char *name, const char *label, const char *format) |
| Assign attributes for a BLOB property. The BLOB's data and auxiliary elements will be set to NULL. | |
| void | IUFillSwitchVector (ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name, const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s) |
| Assign attributes for a switch vector property. The vector's auxiliary elements will be set to NULL. | |
| void | IUFillLightVector (ILightVectorProperty *lvp, ILight *lp, int nlp, const char *dev, const char *name, const char *label, const char *group, IPState s) |
| Assign attributes for a light vector property. The vector's auxiliary elements will be set to NULL. | |
| void | IUFillNumberVector (INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s) |
| Assign attributes for a number vector property. The vector's auxiliary elements will be set to NULL. | |
| void | IUFillTextVector (ITextVectorProperty *tvp, IText *tp, int ntp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s) |
| Assign attributes for a text vector property. The vector's auxiliary elements will be set to NULL. | |
| void | IUFillBLOBVector (IBLOBVectorProperty *bvp, IBLOB *bp, int nbp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s) |
| Assign attributes for a BLOB vector property. The vector's auxiliary elements will be set to NULL. | |
| int | IUSnoopNumber (XMLEle *root, INumberVectorProperty *nvp) |
| Update a snooped number vector property from the given XML root element. | |
| int | IUSnoopText (XMLEle *root, ITextVectorProperty *tvp) |
| Update a snooped text vector property from the given XML root element. | |
| int | IUSnoopLight (XMLEle *root, ILightVectorProperty *lvp) |
| Update a snooped light vector property from the given XML root element. | |
| int | IUSnoopSwitch (XMLEle *root, ISwitchVectorProperty *svp) |
| Update a snooped switch vector property from the given XML root element. | |
| int | IUSnoopBLOB (XMLEle *root, IBLOBVectorProperty *bvp) |
| Update a snooped BLOB vector property from the given XML root element. | |
This section describes handy utility functions that are provided by the framework for tasks commonly required in the processing of client messages. It is not strictly necessary to use these functions, but it both prudent and efficient to do so.
These do not communicate with the Client in any way.
| void IUFillBLOB | ( | IBLOB * | bp, |
| const char * | name, | ||
| const char * | label, | ||
| const char * | format | ||
| ) |
Assign attributes for a BLOB property. The BLOB's data and auxiliary elements will be set to NULL.
| bp | pointer a BLOB property to fill |
| name | the BLOB name |
| label | the BLOB label |
| format | the BLOB format. |
Definition at line 362 of file indidriver.c.
| void IUFillBLOBVector | ( | IBLOBVectorProperty * | bvp, |
| IBLOB * | bp, | ||
| int | nbp, | ||
| const char * | dev, | ||
| const char * | name, | ||
| const char * | label, | ||
| const char * | group, | ||
| IPerm | p, | ||
| double | timeout, | ||
| IPState | s | ||
| ) |
Assign attributes for a BLOB vector property. The vector's auxiliary elements will be set to NULL.
| bvp | pointer a BLOB vector property to fill |
| bp | pointer to an array of BLOBs |
| nbp | the dimension of bp |
| dev | the device name this vector property belongs to |
| name | the vector property name |
| label | the vector property label |
| group | the vector property group |
| p | the vector property permission |
| timeout | vector property timeout in seconds |
| s | the vector property initial state. |
Definition at line 438 of file indidriver.c.
Assign attributes for a light property. The light's auxiliary elements will be set to NULL.
| lp | pointer a light property to fill |
| name | the light name |
| label | the light label |
| s | the light state (IDLE, WARNING, OK, ALERT) |
Definition at line 322 of file indidriver.c.
| void IUFillLightVector | ( | ILightVectorProperty * | lvp, |
| ILight * | lp, | ||
| int | nlp, | ||
| const char * | dev, | ||
| const char * | name, | ||
| const char * | label, | ||
| const char * | group, | ||
| IPState | s | ||
| ) |
Assign attributes for a light vector property. The vector's auxiliary elements will be set to NULL.
| lvp | pointer a light vector property to fill |
| lp | pointer to an array of lights |
| nlp | the dimension of lp |
| dev | the device name this vector property belongs to |
| name | the vector property name |
| label | the vector property label |
| group | the vector property group |
| s | the vector property initial state. |
Definition at line 392 of file indidriver.c.
| void IUFillNumber | ( | INumber * | np, |
| const char * | name, | ||
| const char * | label, | ||
| const char * | format, | ||
| double | min, | ||
| double | max, | ||
| double | step, | ||
| double | value | ||
| ) |
Assign attributes for a number property. The number's auxiliary elements will be set to NULL.
| np | pointer a number property to fill |
| name | the number name |
| label | the number label |
| format | the number format in printf style (e.g. "%02d") |
| min | the minimum possible value |
| max | the maximum possible value |
| step | the step used to climb from minimum value to maximum value |
| value | the number's current value |
Definition at line 332 of file indidriver.c.
| void IUFillNumberVector | ( | INumberVectorProperty * | nvp, |
| INumber * | np, | ||
| int | nnp, | ||
| const char * | dev, | ||
| const char * | name, | ||
| const char * | label, | ||
| const char * | group, | ||
| IPerm | p, | ||
| double | timeout, | ||
| IPState | s | ||
| ) |
Assign attributes for a number vector property. The vector's auxiliary elements will be set to NULL.
| nvp | pointer a number vector property to fill |
| np | pointer to an array of numbers |
| nnp | the dimension of np |
| dev | the device name this vector property belongs to |
| name | the vector property name |
| label | the vector property label |
| group | the vector property group |
| p | the vector property permission |
| timeout | vector property timeout in seconds |
| s | the vector property initial state. |
Definition at line 405 of file indidriver.c.
Assign attributes for a switch property. The switch's auxiliary elements will be set to NULL.
| sp | pointer a switch property to fill |
| name | the switch name |
| label | the switch label |
| s | the switch state (ISS_ON or ISS_OFF) |
Definition at line 313 of file indidriver.c.
| void IUFillSwitchVector | ( | ISwitchVectorProperty * | svp, |
| ISwitch * | sp, | ||
| int | nsp, | ||
| const char * | dev, | ||
| const char * | name, | ||
| const char * | label, | ||
| const char * | group, | ||
| IPerm | p, | ||
| ISRule | r, | ||
| double | timeout, | ||
| IPState | s | ||
| ) |
Assign attributes for a switch vector property. The vector's auxiliary elements will be set to NULL.
| svp | pointer a switch vector property to fill |
| sp | pointer to an array of switches |
| nsp | the dimension of sp |
| dev | the device name this vector property belongs to |
| name | the vector property name |
| label | the vector property label |
| group | the vector property group |
| p | the vector property permission |
| r | the switches behavior |
| timeout | vector property timeout in seconds |
| s | the vector property initial state. |
Definition at line 377 of file indidriver.c.
| void IUFillText | ( | IText * | tp, |
| const char * | name, | ||
| const char * | label, | ||
| const char * | initialText | ||
| ) |
Assign attributes for a text property. The text's auxiliary elements will be set to NULL.
| tp | pointer a text property to fill |
| name | the text name |
| label | the text label |
| initialText | the initial text |
Definition at line 348 of file indidriver.c.
| void IUFillTextVector | ( | ITextVectorProperty * | tvp, |
| IText * | tp, | ||
| int | ntp, | ||
| const char * | dev, | ||
| const char * | name, | ||
| const char * | label, | ||
| const char * | group, | ||
| IPerm | p, | ||
| double | timeout, | ||
| IPState | s | ||
| ) |
Assign attributes for a text vector property. The vector's auxiliary elements will be set to NULL.
| tvp | pointer a text vector property to fill |
| tp | pointer to an array of texts |
| ntp | the dimension of tp |
| dev | the device name this vector property belongs to |
| name | the vector property name |
| label | the vector property label |
| group | the vector property group |
| p | the vector property permission |
| timeout | vector property timeout in seconds |
| s | the vector property initial state. |
Definition at line 422 of file indidriver.c.
| IBLOB* IUFindBLOB | ( | const IBLOBVectorProperty * | bvp, |
| const char * | name | ||
| ) |
| ILight* IUFindLight | ( | const ILightVectorProperty * | lvp, |
| const char * | name | ||
| ) |
| INumber* IUFindNumber | ( | const INumberVectorProperty * | nvp, |
| const char * | name | ||
| ) |
| ISwitch* IUFindOnSwitch | ( | const ISwitchVectorProperty * | sp | ) |
Returns the first ON switch it finds in the vector switch property.
| sp | a pointer to a switch vector property. |
| int IUFindOnSwitchIndex | ( | const ISwitchVectorProperty * | sp | ) |
Returns the index of first ON switch it finds in the vector switch property.
| sp | a pointer to a switch vector property. |
| ISwitch* IUFindSwitch | ( | const ISwitchVectorProperty * | svp, |
| const char * | name | ||
| ) |
| IText* IUFindText | ( | const ITextVectorProperty * | tvp, |
| const char * | name | ||
| ) |
| void IUResetSwitch | ( | ISwitchVectorProperty * | svp | ) |
| int IUSaveBLOB | ( | IBLOB * | bp, |
| int | size, | ||
| int | blobsize, | ||
| char * | blob, | ||
| char * | format | ||
| ) |
Function to save blob metadata in the corresponding blob.
| bp | pointer to an IBLOB member. |
| size | size of the blob buffer encoded in base64 |
| blobsize | actual size of the buffer after base64 decoding. This is the actual byte count used in drivers. |
| blob | pointer to the blob buffer |
| format | format of the blob buffer |
Definition at line 304 of file indidriver.c.
| void IUSaveText | ( | IText * | tp, |
| const char * | newtext | ||
| ) |
| int IUSnoopBLOB | ( | XMLEle * | root, |
| IBLOBVectorProperty * | bvp | ||
| ) |
Update a snooped BLOB vector property from the given XML root element.
| root | XML root elememnt containing the snopped property content |
| bvp | a pointer to the BLOB vector property to be updated. |
Definition at line 619 of file indidriver.c.
| int IUSnoopLight | ( | XMLEle * | root, |
| ILightVectorProperty * | lvp | ||
| ) |
Update a snooped light vector property from the given XML root element.
| root | XML root elememnt containing the snopped property content |
| lvp | a pointer to the light vector property to be updated. |
Definition at line 539 of file indidriver.c.
| int IUSnoopNumber | ( | XMLEle * | root, |
| INumberVectorProperty * | nvp | ||
| ) |
Update a snooped number vector property from the given XML root element.
| root | XML root elememnt containing the snopped property content |
| nvp | a pointer to the number vector property to be updated. |
Definition at line 464 of file indidriver.c.
| int IUSnoopSwitch | ( | XMLEle * | root, |
| ISwitchVectorProperty * | svp | ||
| ) |
Update a snooped switch vector property from the given XML root element.
| root | XML root elememnt containing the snopped property content |
| svp | a pointer to the switch vector property to be updated. |
Definition at line 579 of file indidriver.c.
| int IUSnoopText | ( | XMLEle * | root, |
| ITextVectorProperty * | tvp | ||
| ) |
Update a snooped text vector property from the given XML root element.
| root | XML root elememnt containing the snopped property content |
| tvp | a pointer to the text vector property to be updated. |
Definition at line 502 of file indidriver.c.
| int IUUpdateBLOB | ( | IBLOBVectorProperty * | bvp, |
| int | sizes[], | ||
| int | blobsizes[], | ||
| char * | blobs[], | ||
| char * | formats[], | ||
| char * | names[], | ||
| int | n | ||
| ) |
Update all BLOB members in a BLOB vector property.
| bvp | a pointer to a BLOB vector property. |
| sizes | sizes of the blobs. |
| blobsizes | size of the blobs, raw without compression. |
| blobs | a pointer to the BLOB members |
| names | the names of the IBLOB members to update. |
| formats | The blob format or extension. |
| n | the number of IBLOB members to update. |
Definition at line 276 of file indidriver.c.
| void IUUpdateMinMax | ( | const INumberVectorProperty * | nvp | ) |
Function to update the min and max elements of a number in the client.
| nvp | pointer to an INumberVectorProperty. |
Definition at line 1684 of file indidriver.c.
| int IUUpdateNumber | ( | INumberVectorProperty * | nvp, |
| double | values[], | ||
| char * | names[], | ||
| int | n | ||
| ) |
Update all numbers in a number vector property.
| nvp | a pointer to a number vector property. |
| values | the states of the new INumber members. |
| names | the names of the INumber members to update. |
| n | the number of INumber members to update. |
Definition at line 209 of file indidriver.c.
| int IUUpdateSwitch | ( | ISwitchVectorProperty * | svp, |
| ISState * | states, | ||
| char * | names[], | ||
| int | n | ||
| ) |
Update all switches in a switch vector property.
| svp | a pointer to a switch vector property. |
| states | the states of the new ISwitch members. |
| names | the names of the ISwtich members to update. |
| n | the number of ISwitch members to update. |
Definition at line 155 of file indidriver.c.
| int IUUpdateText | ( | ITextVectorProperty * | tvp, |
| char * | texts[], | ||
| char * | names[], | ||
| int | n | ||
| ) |
Update all text members in a text vector property.
| tvp | a pointer to a text vector property. |
| texts | a pointer to the text members |
| names | the names of the IText members to update. |
| n | the number of IText members to update. |
Definition at line 246 of file indidriver.c.
1.8.1.2