def getChannelData_Firmware(self, channel):
"""Get device firmware version
Retrieves the firmvare version numbers for the device connected to
channel.
Args:
channel (int): The channel you are interested in
Returns:
major (int): The major version number
minor (int): The minor version number
build (int): The build number
"""
self.fn = inspect.currentframe().f_code.co_name
buf_type = ct.c_ushort * 4
buf = buf_type()
self.dll.canGetChannelData(channel,
canCHANNELDATA_CARD_FIRMWARE_REV,
ct.byref(buf), ct.sizeof(buf))
(build, release, minor, major) = struct.unpack('HHHH', buf)
return (major, minor, build)
canlib.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录