public static SendTable CreateWith(CSVCMsg_SendTable proto) { var table = new SendTable() { NetTableName = proto.net_table_name, NeedsDecoder = proto.needs_decoder, }; foreach (var prop in proto.props) { table.Properties.Add(PropertyInfo.CreateWith(prop, table)); } return table; }
public static PropertyInfo CreateWith(CSVCMsg_SendTable.sendprop_t proto, SendTable origin) { return new PropertyInfo() { Type = (PropertyType) proto.type, VarName = proto.var_name, Flags = (MultiFlag) proto.flags, Priority = (uint) proto.priority, DtName = proto.dt_name, NumElements = (uint) proto.num_elements, LowValue = proto.low_value, HighValue = proto.high_value, NumBits = (byte) proto.num_bits, Origin = origin, }; }
private Event? Process(CSVCMsg_SendTable message) { client.SendTables.Add(SendTable.CreateWith(message)); log.Debug(String.Format("CSVCMsg_SendTable: {0} with {1} props", message.net_table_name, message.props.Count)); return null; }