smia.logic.inter_aas_interactions_utils module

This class groups the methods related to the Inter AAS interactions between I4.0 SMIA entities.

smia.logic.inter_aas_interactions_utils.create_svc_json_data_from_acl_msg(acl_msg)[source]

This method creates the dictionary with all the required data of a service related to an ACL message.

Parameters:

acl_msg (spade.message.Message) – ACL message where to get the information

Returns:

dictionary with all the information about the service

Return type:

dict

smia.logic.inter_aas_interactions_utils.create_inter_smia_response_msg(receiver, thread, performative, ontology, service_id=None, service_type=None, service_params=None)[source]

This method creates the Inter AAS interaction response object.

Parameters:
  • receiver (str) – the JID of the receiver of the ACL message from which the service is requested.

  • thread (str) – the thread of the ACL message.

  • performative (str) – the performative of the ACL message.

  • ontology (str) – the ontology of the ACL message.

  • service_id (str) – the serviceID of the ACL message.

  • service_type (str) – the serviceType of the ACL message.

  • service_params (str) – the serviceParams of the “serviceData” section of the ACL message.

Returns:

SPADE message object FIPA-ACL-compliant.

Return type:

spade.message.Message

async smia.logic.inter_aas_interactions_utils.check_received_request_data_structure(received_data, json_schema)[source]

This method checks if the received data for a request is valid. The JSON object with the specific data is also validated against the given associated JSON Schema. In any case, if it is invalid, it raises a RequestDataError exception.

Parameters:
  • received_data (dict) – received data in form of a JSON object.

  • json_schema (dict) – JSON Schema in form of a JSON object.