sdo.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:canopen 作者: christiansandberg 项目源码 文件源码
def download(self, index, subindex, data, force_segment=False):
        """May be called to make a write operation without an Object Dictionary.

        :param int index:
            Index of object to write.
        :param int subindex:
            Sub-index of object to write.
        :param bytes data:
            Data to be written.
        :param bool force_segment:
            Force use of segmented transfer regardless of data size.

        :raises canopen.SdoCommunicationError:
            On unexpected response or timeout.
        :raises canopen.SdoAbortedError:
            When node responds with an error.
        """
        raw_stream = WritableStream(self, index, subindex, len(data), force_segment)
        fp = io.BufferedWriter(raw_stream, 7)
        fp.write(data)
        fp.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号