ContactManager is a device intended to manage local contact for DataStorage, updating its reference in PANIC phonebook.
ContactManager is a device intended to manage local contact for DataStorage, updating its reference in PANIC phonebook.
It is published under the [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.en.html)
It is published under the [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.en.html)
*(see LICENSE.txt file)*.
*(see LICENSE.txt file)*.
...
@@ -11,23 +12,31 @@ To properly work, this device needs:
...
@@ -11,23 +12,31 @@ To properly work, this device needs:
---
---
## Device Properties
## Device Properties
| Name | Type | Description |
| Name | Type | Description |
| ---- | ---- | ----------- |
| ContactKey | String | The key for which to modify the value in PANIC Phonebook. |
| ContactKey | String | The key for which to modify the value in PANIC Phonebook. |
| ContactList | String[] | The contacts this device should know.<br />Each contact should be written this way:<br />Contact_Name:PhoneBook_Value<br /><br />The Contact_Name entries will represent the possible enum labels for contact attribute.<br />The PhoneBook_Value is what to write in PANIC Phonebook at the key defined in ContactKey property when contact attribute is set with Contact_Name.<br /><br />Example:<br />John:john.doe@synchrotron-soleil.fr<br />Jack:%JACK<br />Telma:telma.louise@synchrotron-soleil.fr<br /><br />With this example, contact attribut will have the enum labels [\"Unknown\", \"John\", \"Jack\", \"Telma\"]. |
| ContactList | String[] | The contacts this device should know.<br />Each contact should be written this way:<br />Contact_Name:PhoneBook_Value<br /><br />The Contact_Name entries will represent the possible enum labels for contact attribute.<br />The PhoneBook_Value is what to write in PANIC Phonebook at the key defined in ContactKey property when contact attribute is set with Contact_Name.<br /><br />Example:<br />John:john.doe@synchrotron-soleil.fr<br />Jack:%JACK<br />Telma:telma.louise@synchrotron-soleil.fr<br /><br />With this example, contact attribut will have the enum labels [\"Unknown\", \"John\", \"Jack\", \"Telma\"]. |
## Attributes
## Attributes
| Name | Dynamic | Attr. type | R/W type | Data type | Level | Description |
| Name | Dynamic | Attr. type | R/W type | Data type | Level | Description |
| contact | true | Scalar | READ_WRITE | Tango::DEV_ENUM | OPERATOR | What to write in PANIC Phonebook for the key defined in ContactKey property.<br/>The effective written value will be the one in ContactList property for which the key matches the selected label in contact attribute.<br/><br/>"Unknown" will always be present in enum labels at first index.<br/>Setting contact attribute with "Unknown" will have effect neither on PANIC Phonebook, nore on contact read value.<br/>contact read value may return "Unknown" when the value in PANIC Phonebook for the key defined in ContactKey property matches no known value, or when this key is not present in PANIC Phonebook. |
| contact | true | Scalar | READ_WRITE | Tango::DEV_ENUM | OPERATOR | What to write in PANIC Phonebook for the key defined in ContactKey property.<br/>The effective written value will be the one in ContactList property for which the key matches the selected label in contact attribute.<br/><br/>"Unknown" will always be present in enum labels at first index.<br/>Setting contact attribute with "Unknown" will have effect neither on PANIC Phonebook, nore on contact read value.<br/>contact read value may return "Unknown" when the value in PANIC Phonebook for the key defined in ContactKey property matches no known value, or when this key is not present in PANIC Phonebook. |
## Commands
## Commands
| Name | Input type | Output type | Level | Description |
| Name | Input type | Output type | Level | Description |
| Init | DEV_VOID | DEV_VOID | OPERATOR | This command initializes the device, forcing it to parse its properties and rebuild its attributes. |
| Init | DEV_VOID | DEV_VOID | OPERATOR | This command initializes the device, forcing it to parse its properties and rebuild its attributes. |
| State | DEV_VOID | DEV_STATE | OPERATOR | This command gets the device state (stored in its device_state data member) and returns it to the caller. |
| State | DEV_VOID | DEV_STATE | OPERATOR | This command gets the device state (stored in its device_state data member) and returns it to the caller. |
| Status | DEV_VOID | CONST_DEV_STRING | OPERATOR | This command gets the device status (stored in its device_status data member) and returns it to the caller. |
| Status | DEV_VOID | CONST_DEV_STRING | OPERATOR | This command gets the device status (stored in its device_status data member) and returns it to the caller. |
## States
## States
| Name | Description |
| Name | Description |
| ---- | ----------- |
| ALARM | Device failed to update PANIC Phonebook or to init PyAlarm devices. |
| ALARM | Device failed to update PANIC Phonebook or to init PyAlarm devices. |
| FAULT | ContactList property is not correcty set. |
| FAULT | ContactList property is not correcty set. |
| INIT | Device is initializing, parsing its properties and checking PANIC phonebook availability. |
| INIT | Device is initializing, parsing its properties and checking PANIC phonebook availability. |