{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "=========================\nPython CAN-FIX Library\n=========================\n\npython-canfix is a Python package that abstracts the details of the\nCAN-FIX communication protocol.\n\nCAN-FIX is the CAN bus implementation of a set of protocols and specifications\nknown as FIX. FIX stands for Flight Information eXchange and is an attempt to\nstandardize communication among aircraft systems in small aircraft.\n\nThe project is hosted on GitHub at...\n\nhttps://github.com/birkelbach/python-canfix\n\nInstallation\n============\n\nInstall ``can`` with ``pip``:\n::\n\n $ pip install python-canfix\n\n\nYou can also install directly from the source directory by running:\n::\n\n $ python setup.py install\n\nThe only dependency is python-can, which should be automatically installed\nby the above commands.\n\nAPI\n===\n\nYou should be familiar with the CANFIX protocol specification before using\nthis library. CANFIX has several different message types. Each of these\ntypes is representd by a class in this library.\n\n\nNodeAlarm Class\n---------------\n\nThe constructor can take one named parameter. ``msg`` can be assigned a\npython-can ``Message`` and the instantiated object will be initialized\nwith the correct information.\n\n**Properties**\n\n``NoneAlarm.node`` - Sets or returns the node address of the node that sent (or will send) the Alarm Message. Should be an\ninteger between 1 and 254\n\n``NodeAlarm.alarm`` - Sets or returns the alarm type. The meaning of this data is dependent on the individual node type.\nShould be an integer between 0 and 65,535.\n\n``NodeAlarm.data`` - Sets or returns a list that represents the data for this alarm. What the data represents is dependent\non the specific type of node and the alarm type. It should be a list of bytes of up to 6 bytes in length.\n\n``NodeAlarm.msg`` - Sets or returns a can.Message class that is suitable for use with a python-can bus. If this property\nis set with a message received from the can bus then the message will be parsed and the node, alarm and data properties\nwill be set accordingly. If it is read then the message will be constructed with the node, alarm and data properties\nthat should have been previously set.\n\nExample Usage::\n\n >>> na = canfix.NodeAlarm()\n >>> na.node = 12\n >>> na.alarm = 45321\n >>> na.data = [4,5,6,7]\n >>> na.msg\n >>> na.msg\n can.Message(timestamp=0.0, is_remote_frame=False, extended_id=False, is_error_frame=False, arbitration_id=0xc, dlc=0,\n data=[0x9, 0xb1, 0x4, 0x5, 0x6, 0x7])\n\n >>> msg = bus.recv() # Assume we read the same message that we created above\n >>> na = canfix.NodeAlarm(msg)\n >>> print(na)\n [12] Node Alarm 45321 Data 04050607\n\n\nParameter Class\n---------------\n\nThe constructor can take one named parameter. ``msg`` can be assigned a\npython-can ``Message`` and the instantiated object will be initialized\nwith the correct information.\n\n**Properties**\n\n``Parameter.node`` - Sets or returns the node address of the node that sent (or will send) the Parameter.\nShould be an integer between 1 and 254\n\n``Parameter.identifier`` - Sets or returns the CAN bus identifier for this parameter. If the identifier is out of\nof range for Parameter messages a ValueError exception will be raised. Setting this will also cause protocol specific\ninformation to be set in the object. This includes the data type, the engineering units, name etc.\n\n``Parameter.name`` - Sets or returns the name of the parameter. i.e. \"Indicated Airspeed\" If the name is not found\nin the protocol ValueError exception will be raised. Setting this will also cause protocol specific\ninformation to be set in the object. This includes the data type, the engineering units, identifier etc.\n\n``Parameter.index`` - Sets or returns the index of the parameter. Should be an integer between 0 and 255.\n\n``Parameter.failure`` - Sets or returns the flag that indicates data failure. Should be ``True`` or ``False``\n\n``Parameter.quality`` - Sets or returns the flag that indicates data quality. Should be ``True`` or ``False``\n\n``Parameter.annunciate`` - Sets or returns the flag that indicates the paramter should be annunciated.\nShould be ``True`` or ``False``\n\n``Parameter.meta`` - Sets or returns the meta data index for the Parameter. Should be an integer between 0 and 15\n\n``Parameter.value`` - Sets or returns the value for the parameter. It can be a list of multiple values if the\nparticular parameter is expecting multiple values. It can also be a string\n\n``Parameter.msg`` - Sets or returns a can.Message class that is suitable for use with a python-can bus. If this property\nis set with a message received from the can bus then the message will be parsed and the properties\nwill be set accordingly. If it is read then the message will be constructed with properties\nthat should have been previously set.\n\n``Parameter.fullName`` - Returns a string that represents the parameter that includes the index and the index name.\nThis property is read only.\n\n``Parameter.units`` - Read only property that returns a string indicating the engineering units for this Parameter.\nThis is a protocol specific piece of information and should not change.\n\n``Parameter.type`` - Read only property that returns a string indicating the datatype for the Parameter.\nThis is a protocol specific piece of information and should not change.\n\n``Parameter.min`` - Read only property that returns a value that indicates the minimum value for the Parameter.\nThis is a protocol specific piece of information and should not change.\n\n``Parameter.max`` - Read only property that returns a value that indicates the maximum value for the Parameter.\nThis is a protocol specific piece of information and should not change.\n\n``Parameter.format`` - Read only property that returns the format of the data in the Parameter value. This is typically\nused to indicated what WORD and BYTE type data means.\nThis is a protocol specific piece of information and should not change.\n\n``Parameter.remarks`` - Read only property that returns a list of remarks that are associated with this Parameter\nin the protocol specification.\nThis is a protocol specific piece of information and should not change.\n\n``Parameter.indexName`` - Read only property that retuns he name of what the index represents. i.e. Cylinder\nThis is a protocol specific piece of information and should not change.\n\n``Parameter.multiplier`` - Read only property that returns the multiplier for the Parameter. Some paramters use\nan integer with a multiplier as the value in the message. For example if we had a Parameter value of 123.4 and\nthe multiplier is 0.1 then the data that would be communicated on the bus would be 1234. The receiver would then\nmultiply by 0.1 to get the original value of 123.4. The ``python-canfix`` library handles these details for you\nso you don't need to concern yourself with this detail. It is a part of the protocol and is included here for\napplications that want to display protocol specific information to the user.\nThis is a protocol specific piece of information and should not change.\n\nExample Usage::\n\n >>> pa = canfix.Parameter()\n >>> pa.node = 2\n >>> pa.value = 123.4\n >>> print(pa)\n [2] Indicated Airspeed: 123.4 knots\n >>> pa.msg\n can.Message(timestamp=0.0, is_remote_frame=False, extended_id=False, is_error_frame=False, arbitration_id=0x183,\n dlc=0, data=[0x2, 0x0, 0x0, 0xd2, 0x4])\n\n\nTwoWayMsg Class\n---------------\n\nThe constructor can take one named parameter. ``msg`` can be assigned a\npython-can ``Message`` and the instantiated object will be initialized\nwith the correct information.\n\n**Properties**\n\n``TwoWayMsg.channel`` - Sets the channel that this message will be sent on. There are\n16 channels numbered 0-15\n\n``TwoWayMsg.type`` - Set to either 'Request' or 'Response' This determines which\nside of the channel to use.\n\n``TwoWayMsg.data`` - Up to eight bytes\n\nNodeSpecific Class\n------------------\n\nThe constructor can take one named parameter. ``msg`` can be assigned a\npython-can ``Message`` and the instantiated object will be initialized\nwith the correct information.\n\n**Properties**\n\n``NodeSpecific.destNode`` - Represents the node address of the node that this\nmessage is addressed to. Should be an integer between 1 and 254.\n\n``NodeSpecific.controlCode`` - The control code for the messge. Currently, valid\nvalues are 0-10. Future versions of the CAN-FIX specification may use 11-127 and\nvalues from 128 to 255 are reserved for user defined functions. The control\ncode is basically the function of the message. See the CAN-FIX specification\nfor details.\n\n``NodeSpecific.data`` - Up to 8 bytes of data that is dependent on which type\nof message that is being sent.\n\nFunctions\n---------\n\n``parseMessage(msg)`` - When passed a ``Message`` this function figures\nout what the message type is, instantiates the correct object type and\nreturns that object. This function would be used for most all received\nmessages.\n\nExample Usage::\n\n >>> msg = bus.recv()\n >>> msg\n can.Message(timestamp=0.0, is_remote_frame=False, extended_id=False,\n is_error_frame=False, arbitration_id=0x183, dlc=5,\n data=[0xc, 0x0, 0x0, 0xd2, 0x4])\n >>> p = canfix.parseMessage(msg)\n >>> p\n \n >>> print(p)\n [12] Indicated Airspeed: 123.4 knots\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/birkelbach/python-canfix", "keywords": "", "license": "GNU General Public License Version 2", "maintainer": "", "maintainer_email": "", "name": "python-canfix", "package_url": "https://pypi.org/project/python-canfix/", "platform": "", "project_url": "https://pypi.org/project/python-canfix/", "project_urls": { "Homepage": "https://github.com/birkelbach/python-canfix" }, "release_url": "https://pypi.org/project/python-canfix/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "CAN-FIX Protocol Implementation Library", "version": "0.1.0" }, "last_serial": 3347188, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b75987526d07f985d927b1ae430dc707", "sha256": "f3d6bd8a1a6dde7107a1f467bd6276ce34785612890e79801651f02b6650c7ed" }, "downloads": -1, "filename": "python-canfix-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b75987526d07f985d927b1ae430dc707", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16708, "upload_time": "2017-11-20T01:53:36", "url": "https://files.pythonhosted.org/packages/26/a4/8190af3ee8529ae79dbc1a61a87605c88c078b5728bdddd4e36c2f0e8c48/python-canfix-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b75987526d07f985d927b1ae430dc707", "sha256": "f3d6bd8a1a6dde7107a1f467bd6276ce34785612890e79801651f02b6650c7ed" }, "downloads": -1, "filename": "python-canfix-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b75987526d07f985d927b1ae430dc707", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16708, "upload_time": "2017-11-20T01:53:36", "url": "https://files.pythonhosted.org/packages/26/a4/8190af3ee8529ae79dbc1a61a87605c88c078b5728bdddd4e36c2f0e8c48/python-canfix-0.1.0.tar.gz" } ] }