Mistake on this page? Email us

FCU class references

SetupStatus

The SetupStatus object provides the result of the methods FactoryToolApi().get_setup_status and FactoryToolApi().setup. It describes the FCU library's setup status, using the following member properties:

  • status (int): Returns an error code of current setup status. Non-zero value indicates failure. See FCU error codes.
  • ca_details: Returns FCU configuration details, if FCU is set up as a certificate authority. See CaStatusDetails.
  • errors (list<ErrorInfo>): Returns a list of ErrorInfo objects if any error has occurred.
  • warnings (list<WarningInfo>): Returns a list of WarningInfo objects if any warning has occurred.

CaStatusDetails

The CaStatusDetails object provides information about FCU's setup as a certificate authority, using the following member properties:

  • keystore_dir (str): Returns the lookup path for the FCU CA certificate or CSR, and private key (whether or not the path exists).
  • certificate_file (str): Returns the path to the FCU CA certificate file (whether or not the file exists).
  • csr_file (str): Returns the path to the FCU CSR file (whether or not the file exists). Relevant only when FCU is set up as an intermediate CA.
  • private_key_file (str): Returns the path to the FCU private key file (whether or not the file exists).

DeviceConfigurationRequest

The DeviceConfigurationRequest object provides the result of FactoryToolApi().prepare_device_configuration. It lists the configuration data to be sent to device:

  • config_data (bytes): Returns the CBOR data to be sent to device.
  • warning_list (list): Returns a validation notice list in warning level.
  • enrollment_id (string): Returns the string representation of the device enrollment ID. Relevant only when first-to-claim is used.
  • fcu_operation_context (FcuOperationContext): Returns the operation context information. Relevant only when next operation exists (for example when using device generated keys).

DeviceResponseStatus

The DeviceResponseStatus object provides the result of FactoryToolApi().verify_device_response. It lists the configuration status returned from the device.

Parameters:

  • status (int): The status code retrieved from device. Non-zero value indicates failure.
  • message (str): The info message returned from the device.
  • errors (list<ErrorInfo>): Returns a list of ErrorInfo objects if any error has occurred.
  • warnings (list<WarningInfo>): Returns a list of WarningInfo objects if any warning has occurred.

Exceptions

Exceptions raised by the FCU library are of type FactoryConfiguratorErrorBase and inherit from Python's Exception type. They all include at least the following attributes:

  • err_code (int): An integer error code that matches the error scenario. See FCU error codes.
  • message (str): A message describing the failure details.

Each FCU API that validates device configuration parameters (for example, prepare_device_configuration), returns a specific FactoryValidatorError exception. If the validation failed, a list of NoticeInfo objects, in warning or error level, will be included as attributes of FactoryConfiguratorErrorBase:

  • error_list (list): Returns a list of ErrorInfo objects if any error has occurred.
  • warning_list (list): Returns a list of WarningInfo objects if any warning has occurred.