.. _object_SystemSpiBus: :index:`SystemSpiBus` --------------------- Description *********** The SystemSpiBus object is an :ref:`SpiBus ` implementation providing access to devices on an SPI bus on the local system. This object was introduced in InCore 2.8. :**› Inherits**: :ref:`SpiBus ` Overview ******** Properties ++++++++++ .. hlist:: :columns: 2 * :ref:`error ` * :ref:`errorString ` * :ref:`index ` * :ref:`SpiBus.bitsPerWord ` * :ref:`SpiBus.devices ` * :ref:`SpiBus.mode ` * :ref:`SpiBus.speed ` * :ref:`Object.objectId ` * :ref:`Object.parent ` Methods +++++++ .. hlist:: :columns: 1 * :ref:`Object.deserializeProperties() ` * :ref:`Object.fromJson() ` * :ref:`Object.serializeProperties() ` * :ref:`Object.toJson() ` Signals +++++++ .. hlist:: :columns: 1 * :ref:`errorOccurred() ` * :ref:`SpiBus.devicesDataChanged() ` * :ref:`Object.completed() ` Enumerations ++++++++++++ .. hlist:: :columns: 1 * :ref:`Error ` * :ref:`SpiBus.Mode ` Properties ********** .. _property_SystemSpiBus_error: .. _signal_SystemSpiBus_errorChanged: .. index:: single: error error +++++ This property holds the most recently occurred error or :ref:`SystemSpiBus.NoError ` if no error occurred. If the same error occurs multiple times this property does not change. Use the :ref:`errorOccurred() ` signal to detect multiple occurrences of the same error. :**› Type**: :ref:`Error ` :**› Signal**: errorChanged() :**› Attributes**: Readonly .. _property_SystemSpiBus_errorString: .. _signal_SystemSpiBus_errorStringChanged: .. index:: single: errorString errorString +++++++++++ This property holds the current human readable error string corresponding to the current value in the :ref:`error ` property. It may include additional information such as failure reasons or locations. :**› Type**: String :**› Signal**: errorStringChanged() :**› Attributes**: Readonly .. _property_SystemSpiBus_index: .. _signal_SystemSpiBus_indexChanged: .. index:: single: index index +++++ This property holds the SPI bus number. :**› Type**: UnsignedInteger :**› Default**: ``4294967295`` :**› Signal**: indexChanged() :**› Attributes**: Writable Signals ******* .. _signal_SystemSpiBus_errorOccurred: .. index:: single: errorOccurred errorOccurred() +++++++++++++++ This signal is emitted whenever an error has occurred, regardless of whether the :ref:`error ` property has changed or not. In contrast to the change notification signal of the :ref:`error ` property this signal is also emitted several times if a certain error occurs several times in succession. Enumerations ************ .. _enum_SystemSpiBus_Error: .. index:: single: Error Error +++++ This enumeration describes all errors which can occur in SystemSpiBus objects. The most recently occurred error is stored in the :ref:`error ` property. .. index:: single: SystemSpiBus.NoError .. index:: single: SystemSpiBus.DeviceOpenError .. index:: single: SystemSpiBus.TransferError .. list-table:: :widths: auto :header-rows: 1 * - Name - Value - Description .. _enumitem_SystemSpiBus_NoError: * - ``SystemSpiBus.NoError`` - ``0`` - No error occurred or was detected. .. _enumitem_SystemSpiBus_DeviceOpenError: * - ``SystemSpiBus.DeviceOpenError`` - ``1`` - Device could not be opened. .. _enumitem_SystemSpiBus_TransferError: * - ``SystemSpiBus.TransferError`` - ``2`` - Failed to transfered the specified number of bytes from/to configured address.