function Write(obj,message) % appends a \n to the message and converts it to uint8 % the result is then passed to WriteRaw WriteWithoutChecks(obj,message); if obj.CheckForErrorAfterEachWrite CheckError(obj); end end
时间: 2024-02-10 13:33:00 浏览: 117
这是一个MATLAB中的函数,它向一个对象写入一条消息,并检查是否存在错误。在这个函数中,输入参数obj是一个对象,message是用户想要写入的消息。函数的实现是将消息message加上一个换行符,然后将其转换成一个uint8类型的向量,最后调用WriteRaw函数将其写入对象中。接着,如果对象设置了CheckForErrorAfterEachWrite属性为true,则调用CheckError函数检查是否存在错误。需要注意的是,这个函数会进行数据有效性检查,但是并不会对数据进行修改。
阅读全文
相关推荐

















