1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #pragma once
- #include <iostream>
- #include <fstream>
- #include <wtypes.h>
- using namespace std;
- namespace HostServer{
- class SyncTimeMsg
- {
- private:
- unsigned long long _localIdCode; // 本节点的id码
- unsigned long long _upperIdCode; // 上一级同步节点的id码
- unsigned long long _rootIdCode; // 根节点的id码
- unsigned short _syncNum; // 时间同步号
- unsigned short _syncLevel; // 同步层级
- unsigned long long _localStationSendTime; // 本分站的发送时间
- unsigned long long _localStationReceiveTime; // 本分站的接收时间
- public:
- unsigned long long LocalIdCode() const { return _localIdCode; }
- void LocalIdCode(unsigned long long val)
- {
- if(val == 14757395258967641292){
- val = 0;
- }
- _localIdCode = val;
- }
- unsigned long long UpperIdCode() const { return _upperIdCode; }
- void UpperIdCode(unsigned long long val) { _upperIdCode = val; }
- unsigned long long RootIdCode() const { return _rootIdCode; }
- void RootIdCode(unsigned long long val) { _rootIdCode = val; }
- unsigned short SyncNum() const { return _syncNum; }
- void SyncNum(unsigned short val) { _syncNum = val; }
- unsigned short SyncLevel() const { return _syncLevel; }
- void SyncLevel(unsigned short val) { _syncLevel = val; }
- unsigned long long LocalStationSendTime() const { return _localStationSendTime; }
- void LocalStationSendTime(unsigned long long val) { _localStationSendTime = val; }
- unsigned long long LocalStationReceiveTime() const { return _localStationReceiveTime; }
- void LocalStationReceiveTime(unsigned long long val) { _localStationReceiveTime = val; }
- };
- }
|