コード例 #1
0
 // 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());
 }
コード例 #2
0
        // 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);
        }
コード例 #3
0
 private void OnMesgDefinitionEvent(object sender, MesgDefinitionEventArgs e)
 {
     _encoder.OnMesgDefinition(e.mesgDef);
 }
コード例 #4
0
ファイル: FitStripper.cs プロジェクト: gabornemeth/MoveSharp
 // 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);
 }
コード例 #5
0
ファイル: Fit.cs プロジェクト: eitanbehar/gpx
 // 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);
 }
コード例 #6
0
 // 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());
 }