// Client implements their handlers of interest and subscribes to MesgBroadcaster events static void OnMesgDefn(object sender, MesgDefinitionEventArgs e) { Console.WriteLine("OnMesgDef: Received Defn for local message #{0}, global num {1}", e.mesgDef.LocalMesgNum, e.mesgDef.GlobalMesgNum); Console.WriteLine("\tIt has {0} fields {1} developer fields and is {2} bytes long", e.mesgDef.NumFields, e.mesgDef.NumDevFields, e.mesgDef.GetMesgSize()); }
// Client implements their handlers of interest and subscribes to MesgBroadcaster events static void OnMesgDefn(object sender, MesgDefinitionEventArgs e) { if (e.mesgDef.LocalMesgNum == 0) { Field field = new Field(RecordMesg.FieldDefNum.Power, 0x84); FieldDefinition definition = new FieldDefinition(field); // Tagg e.mesgDef.AddField(definition); e.mesgDef.NumFields++; } if (e.mesgDef.LocalMesgNum == 1) { Field field = new Field(RecordMesg.FieldDefNum.Power, 0x84); FieldDefinition definition = new FieldDefinition(field); // Tagg e.mesgDef.AddField(definition); e.mesgDef.NumFields++; } encodeDemo.Write(e.mesgDef); }
private void OnMesgDefinitionEvent(object sender, MesgDefinitionEventArgs e) { _encoder.OnMesgDefinition(e.mesgDef); }
// Client implements their handlers of interest and subscribes to MesgBroadcaster events void OnMesgDefn(object sender, MesgDefinitionEventArgs e) { Log("OnMesgDef: Received Defn for local message #{0}, global num {1}", e.mesgDef.LocalMesgNum, e.mesgDef.GlobalMesgNum); Log("\tIt has {0} fields and is {1} bytes long", e.mesgDef.NumFields, e.mesgDef.GetMesgSize()); _encoder.Write(e.mesgDef); }
// Client implements their handlers of interest and subscribes to MesgBroadcaster events static void OnMesgDefn(object sender, MesgDefinitionEventArgs e) { Console.WriteLine("OnMesgDef: Received Defn for local message #{0}, it has {1} fields", e.mesgDef.LocalMesgNum, e.mesgDef.NumFields); }
// Client implements their handlers of interest and subscribes to MesgBroadcaster events static void OnMesgDefn(object sender, MesgDefinitionEventArgs e) { logger.Trace("OnMesgDef: Received Defn for local message #{0}, global num {1}", e.mesgDef.LocalMesgNum, e.mesgDef.GlobalMesgNum); logger.Trace("\tIt has {0} fields and is {1} bytes long", e.mesgDef.NumFields, e.mesgDef.GetMesgSize()); }