Contents
IODev (based on Device)
IODev represents an input or output device (perhaps as well a mixture of both). The basic difference to Device is that it has a physical device attached to the CAN bus.
Public methods
can_addr_list() This function returns a list of strings, indicating for which CAN bus identifiers this object considers itself responsible for. If no addresses have been assigned to this object in software, it returns an empty list.
can_msg_process(msg)
This method is called when ha_control receives a CAN message carrying an address which this object identified as its own (through a call to can_addr_list(). It does some verifications of the message argument and returns a null event as described on the events page. Raises an exception under the following conditions:
TypeError if the msg argument is not a dictionary representing a CAN message.
Private methods
_can_msg_send(msg)
Hands the message string in msg to the ha_iod connection received in globalstate. This function calculates msg['datalen'], so this may be empty or unset in the msg handed to this method. Returns True on success. Raises an exception under the following conditions:
TypeError if the msg argument is not a dictionary representing a CAN message.
ha_common.CANException if the underlying Iodconnect write operation (i.e. writing to the socket connection with ha_iod) failed, or ha_iod returned an error on the respective send operation to the actual hardware. Details about the error are given in the string handed up by the exception.
Public attributes
Supported actions
none
Generated events
none
Configuration
bus
dtid (integer)
Specifies the device type id, as defined in HA-I03
canaddr (integer)
The CAN bus address of the bus device containing this object
ioport (integer)
The I/O port number of this object in the device addressed by canaddr.
THIS DATA IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DATA, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
All product and brand names mentioned on there pages and in the source code are registered names and/or trademarks of the respective owner and are mentioned for identification purposes only.
For a full copyright notice, please see this link. For imprint and contact information, please see http://www.thiemo.net/.