这个类表示CopterSim模拟器的时间戳结构。 更多...
Public 成员函数 | |
| __init__ (self) | |
| RflyTimeStmp类的构造函数。 | |
| __init__ (self, iv) | |
| RflyTimeStmp类的重载构造函数。 | |
| Update (self, iv) | |
| 使用新值更新RflyTimeStmp实例。 | |
Public 属性 | |
| int | checksum = 1234567897 |
| 校验值,应该设置为123456789。 | |
| int | copterID = 0 |
| 当前飞机的ID号。 | |
| int | SysStartTime = 0 |
| 开始仿真时的时间戳(单位毫秒,格林尼治标准时间)。 | |
| int | SysCurrentTime = 0 |
| 当前时间戳(单位毫秒,格林尼治标准时间)。 | |
| int | HeartCount = 0 |
| 心跳包的计数器。 | |
| bool | isCopterSimOnPC = False |
| 布尔值,用于确定CopterSim是否与此脚本在同一台电脑上。 Python端处理的时间戳。 注意:如果CopterSim和本Python脚本在一台电脑,SysCurrentTime和time.time()的数值应该相差很小(最多延迟10ms) 以此差值来判断,CopterSim和本Python脚本是否在一台电脑上 | |
| str | tarIP = '127.0.0.1' |
| 目标IP地址 | |
这个类表示CopterSim模拟器的时间戳结构。
该类设计用于处理和更新CopterSim模拟器中使用的时间戳
注意:本条消息会发送给指定远端电脑的端口20005
struct RflyTimeStmp{
int checksum; //校验位,取123456789
int copterID; //当前飞机的ID号
long long SysStartTime; //开始仿真时的时间戳(单位毫秒,格林尼治标准起点)
long long SysCurrentTime;//当前时间戳(单位毫秒,格林尼治标准起点)
long long HeartCount; //心跳包的计数器
} 2i3q
| __init__ | ( | self | ) |
RflyTimeStmp类的构造函数。
用默认值初始化RflyTimeStmp实例。
| __init__ | ( | self, | |
| iv ) |
RflyTimeStmp类的重载构造函数。
使用提供的值初始化RflyTimeStmp实例。
| iv | 初始化值列表 [checksum, copterID, SysStartTime, SysCurrentTime, HeartCount]。 |
| Update | ( | self, | |
| iv ) |
使用新值更新RflyTimeStmp实例。
用提供的值更新实例变量。
| iv | 新值列表 [checksum, copterID, SysStartTime, SysCurrentTime, HeartCount]。 |
| int checksum = 1234567897 |
校验值,应该设置为123456789。
| int copterID = 0 |
当前飞机的ID号。
| int HeartCount = 0 |
心跳包的计数器。
| bool isCopterSimOnPC = False |
布尔值,用于确定CopterSim是否与此脚本在同一台电脑上。 Python端处理的时间戳。 注意:如果CopterSim和本Python脚本在一台电脑,SysCurrentTime和time.time()的数值应该相差很小(最多延迟10ms) 以此差值来判断,CopterSim和本Python脚本是否在一台电脑上
| int SysCurrentTime = 0 |
当前时间戳(单位毫秒,格林尼治标准时间)。
| int SysStartTime = 0 |
开始仿真时的时间戳(单位毫秒,格林尼治标准时间)。
| str tarIP = '127.0.0.1' |
目标IP地址