compared with
Current by Carlos Rueda
on Jun 06, 2014 14:50.

(show comment)
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (13)

View Page History


h2. Platform attributes
h2. Platform attribute values

h3. (x) {{get_platform_attributes(platform_id)}}
h3. (*g)  {{get_platform_attribute_values(platform_id, attrs)}}

Returns the attributes associated to a given platform.

|| platform_id | | Platform ID ||
|| retval | \{platform_id: \{attr_id : _info_, ...\}, ...\} | dict with a single entry for the requested platform ID with an _info_ dictionary for each attribute in that platform. ||
|| | \{platform_id: 'ERROR_INVALID_PLATFORM_ID'\} | requested {{platform_id}} is invalid. ||

*Platform attribute information:*
*NOTE*: The pair {{(attr_name, attr_instance)}} determines a unique identification for the attribute in the platform.
| field | description | example |
|| attr_name | Short attribute name | 'Battery Status' ||
|| attr_instance | particular instance of the attribute in the platform | ||
|| type | | String ||
|| units | | ||
|| range | | ||
|| monitor_cycle_seconds | | 300 ||
|| push_poll | push \| poll | poll ||
|| group | string for categorization | power ||
|| read_write | read \| read/write | read ||







h3. (*y) {{get_platform_attribute_values(platform_id, attrs)}}

Returns the values for specific attributes associated with a given platform since a given time for each attribute.

|| platform_id | | Platform ID ||
|| port_id | | Port ID ||
| src \\ | String - Source of Command - i.e. Actor (MissionEx,UserName) \\ | |
|| retval | \{platform_id: \{port_id: 'OK_PORT_TURNED_ON'\} \} | Confirmation ||
|| | \{platform_id: \{port_id: 'OK_PORT_ALREADY_ON'\} \} | Port was already on ||
|| platform_id | | Platform ID ||
|| port_id | | Port ID ||
| src \\ | String - Source of Command - i.e. Actor (MissionEx,UserName) | |
|| retval | \{platform_id: \{port_id: 'OK_PORT_TURNED_OFF'\} \} | Confirmation ||
|| | \{platform_id: \{port_id: 'OK_PORT_ALREADY_OFF'\} \} | Port was already off ||
|| port_id | | Port ID ||
|| ma | | ||
|| us | | ||
|| us src | | ||
|| src | | ||
|| retval | \{platform_id: \{port_id: 'OK'\} \} | Confirmation ||
|| | \{platform_id: 'ERROR_INVALID_PLATFORM_ID'\} | If the requested {{platform_id}} is invalid ||
|| message | (/) | human-readable message | <VAR UPS> on battery power ||
|| platform_id | (/) | platform ID where the event occurred | 'Node2B' ||
|| event_id | (/) | ID used from Platform to Mission Execution ("None") \\ | 'profiler_at \_20m' \\ ||
|| timestamp | (/) | time of occurrence | ||
|| first_time_timestamp | (/) | time of first occurrence | ||
{code}
[ {
"event_id": "AT_10Meter",
"message": "low battery (synthetic event generated from simulator)"
"platform_id": "Node2B",
|| | _err_ | Error message indicating any missing element in the requested event, etc. ||

The notified event instance will include a {{test_event}} attribute with value {{true}} indicating that the event is a "test" event as requested.

For example, if the requested event dictionary in this call is: