// /////////////////////////////////////////////////////////////////////////////////////////////////// type MSG__MSG_NAME_ struct{ PB xsf_pb._MSG_NAME_ } func (m *MSG__MSG_NAME_) GetID() uint16 { return uint16(xsf_pb._MSG_ID_NAME_) } func (m *MSG__MSG_NAME_) GetEP() uint8 { return xsf_util.EP__MSG_EP_ } func (m *MSG__MSG_NAME_) New() xsf_net.IMessage { return new(MSG__MSG_NAME_) } func (m *MSG__MSG_NAME_) Import(data []byte) { proto.Unmarshal(data, &m.PB) } func (m *MSG__MSG_NAME_) Export() []byte { out, err := proto.Marshal(&m.PB) if err != nil { xsf_log.Panic("MSG__MSG_NAME_ Marshal error, error=" + err.Error()) return nil } return out } func (m *MSG__MSG_NAME_) ToString() string { return m.PB.String() }