operator_gui_behaviours module¶
- class operator_gui_behaviours.OperatorGUIBehaviour[source]¶
Bases:
OneShotBehaviourThe behavior for the Operator only needs to add the web interface to the SMIA SPADE agent and the GUI related resources (HTML web pages and drivers).
- class operator_gui_behaviours.OperatorRequestBehaviour(agent_object, req_data)[source]¶
Bases:
OneShotBehaviourThis behaviour handles the CSS-related requests through FIPA-ACL messages.
- async adapt_msg_to_fipa_smiacl(msg_body_json: dict) dict[source]¶
- This method adapts a FIPA-ACL message into one that is compatible with the FIPA-SMIACL normalized language
(used in SMIA versions later than 0.2.4).
- Parameters:
msg_body_json – dict with body of the message.
- Returns:
dict with adapted body of the message.
- Return type:
msg_body_json
- static create_acl_msg(receiver_jid, thread, metadata, body_json)[source]¶
This method creates an FIPA-ACL SPADE message.
- Parameters:
receiver_jid (str) – the JID of the SMIA agent receiver.
thread (str) – thread of the message.
metadata – metadata of the message.
body_json (dict) – the body of the message in JSON format.
- Returns:
the SPADE message object.
- Return type:
spade.message.Message