| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 10 使用新手卡 #tagUseNewGuyCard
|
| | |
|
| | | class tagUseNewGuyCard(Structure):
|
| | | Head = tagHead()
|
| | | CodeStrLen = 0 #(BYTE CodeStrLen)
|
| | | CodeStr = "" #(String CodeStr)//size = CodeStrLen
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x10
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.CodeStrLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CodeStr,_pos = CommFunc.ReadString(_lpData, _pos,self.CodeStrLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x10
|
| | | self.CodeStrLen = 0
|
| | | self.CodeStr = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.CodeStr)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.CodeStrLen)
|
| | | data = CommFunc.WriteString(data, self.CodeStrLen, self.CodeStr)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | CodeStrLen:%d,
|
| | | CodeStr:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.CodeStrLen,
|
| | | self.CodeStr
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagUseNewGuyCard=tagUseNewGuyCard()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagUseNewGuyCard.Head.Cmd,m_NAtagUseNewGuyCard.Head.SubCmd))] = m_NAtagUseNewGuyCard
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A6 23 修改家族公告 #tagCMChangeFamilyBroadcast
|
| | |
|
| | | class tagCMChangeFamilyBroadcast(Structure):
|
| | |
| | |
|
| | | m_NAtagCGQueryTagMapTeam=tagCGQueryTagMapTeam()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryTagMapTeam.Cmd,m_NAtagCGQueryTagMapTeam.SubCmd))] = m_NAtagCGQueryTagMapTeam
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B9 10 查询在线队员对应功能数据 #tagCGQueryTeamMemFuncData
|
| | |
|
| | | class tagCGQueryTeamMemFuncData(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TeamMemFuncType", c_ubyte), # 查询队员的功能数据类型
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB9
|
| | | self.SubCmd = 0x10
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB9
|
| | | self.SubCmd = 0x10
|
| | | self.TeamMemFuncType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCGQueryTeamMemFuncData)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B9 10 查询在线队员对应功能数据 //tagCGQueryTeamMemFuncData:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TeamMemFuncType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TeamMemFuncType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCGQueryTeamMemFuncData=tagCGQueryTeamMemFuncData()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryTeamMemFuncData.Cmd,m_NAtagCGQueryTeamMemFuncData.SubCmd))] = m_NAtagCGQueryTeamMemFuncData
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|