Commit 86c21792 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent bcd93b0d
...@@ -30,3 +30,8 @@ func (p *NodeInfo) NEODecode(data []byte) (int, error) { ...@@ -30,3 +30,8 @@ func (p *NodeInfo) NEODecode(data []byte) (int, error) {
p.IdTimestamp = float64_NEODecode(data[10:]) p.IdTimestamp = float64_NEODecode(data[10:])
return 18 /* + TODO variable part */, nil return 18 /* + TODO variable part */, nil
} }
func (p *CellInfo) NEODecode(data []byte) (int, error) {
p.UUID = int32(BigEndian.Uint32(data[0:]))
p.CellState = int32(BigEndian.Uint32(data[4:]))
return 8 /* + TODO variable part */, nil
}
...@@ -67,7 +67,7 @@ const ( ...@@ -67,7 +67,7 @@ const (
UNKNOWN //short: U UNKNOWN //short: U
) )
type CellState int type CellState int32
const ( const (
// NOTE cell states description is in protocol.py // NOTE cell states description is in protocol.py
UP_TO_DATE CellState = iota //short: U // XXX tag prefix name ? UP_TO_DATE CellState = iota //short: U // XXX tag prefix name ?
...@@ -163,13 +163,13 @@ type NodeInfo struct { ...@@ -163,13 +163,13 @@ type NodeInfo struct {
IdTimestamp float64 IdTimestamp float64
} }
/*
//type CellList []struct { //type CellList []struct {
type CellInfo struct { type CellInfo struct {
UUID UUID
CellState CellState
} }
/*
//type RowList []struct { //type RowList []struct {
type RowInfo struct { type RowInfo struct {
Offset uint32 // PNumber Offset uint32 // PNumber
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment