@@ -660,9 +660,95 @@ private static IEnumerable<PayloadToParseBagData> getPayloadList()
660660 #endregion
661661
662662 #region ENDPOINT_TIMING
663+ yield return new PayloadToParseBagData (
664+ ERDM_Command . GET_COMMAND ,
665+ ERDM_Parameter . ENDPOINT_TIMING ,
666+ new byte [ ] { 0x00 , 0x01 } ,
667+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
668+ {
669+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
670+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
671+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
672+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( ushort ) ) ) ;
673+
674+ var obj = dataTreeBranch . ParsedObject as ushort ? ;
675+ Assert . That ( obj , Is . Not . Null ) ;
676+ Assert . That ( obj ! . Value , Is . EqualTo ( 1 ) ) ;
677+ } ) ) ;
678+
679+ yield return new PayloadToParseBagData (
680+ ERDM_Command . GET_COMMAND_RESPONSE ,
681+ ERDM_Parameter . ENDPOINT_TIMING ,
682+ new byte [ ] { 0x00 , 0x01 , 0x02 , 0x03 } ,
683+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
684+ {
685+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
686+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
687+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
688+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( GetEndpointTimingResponse ) ) ) ;
689+
690+ var obj = dataTreeBranch . ParsedObject as GetEndpointTimingResponse ;
691+ Assert . That ( obj , Is . Not . Null ) ;
692+ Assert . That ( obj ! . EndpointId , Is . EqualTo ( 1 ) ) ;
693+ Assert . That ( obj ! . TimingId , Is . EqualTo ( 2 ) ) ;
694+ Assert . That ( obj ! . Count , Is . EqualTo ( 3 ) ) ;
695+ } ) ) ;
696+
697+ yield return new PayloadToParseBagData (
698+ ERDM_Command . SET_COMMAND ,
699+ ERDM_Parameter . ENDPOINT_TIMING ,
700+ new byte [ ] { 0x00 , 0x01 , 0x02 } ,
701+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
702+ {
703+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
704+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
705+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
706+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( SetEndpointTimingRequest ) ) ) ;
707+
708+ var obj = dataTreeBranch . ParsedObject as SetEndpointTimingRequest ;
709+ Assert . That ( obj , Is . Not . Null ) ;
710+ Assert . That ( obj ! . EndpointId , Is . EqualTo ( 1 ) ) ;
711+ Assert . That ( obj ! . TimingId , Is . EqualTo ( 2 ) ) ;
712+ } ) ) ;
663713 #endregion
664714
665715 #region ENDPOINT_TIMING_DESCRIPTION
716+ yield return new PayloadToParseBagData (
717+ ERDM_Command . GET_COMMAND ,
718+ ERDM_Parameter . ENDPOINT_TIMING_DESCRIPTION ,
719+ new byte [ ] { 0x03 } ,
720+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
721+ {
722+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
723+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
724+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
725+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( byte ) ) ) ;
726+
727+ var obj = dataTreeBranch . ParsedObject as byte ? ;
728+ Assert . That ( obj , Is . Not . Null ) ;
729+ Assert . That ( obj ! . Value , Is . EqualTo ( 3 ) ) ;
730+ } ) ) ;
731+
732+ yield return new PayloadToParseBagData (
733+ ERDM_Command . GET_COMMAND_RESPONSE ,
734+ ERDM_Parameter . ENDPOINT_TIMING_DESCRIPTION ,
735+ new byte [ ] {
736+ 0x03 , 0x53 , 0x6c , 0x6f , 0x77 , 0x20 , 0x28 , 0x32 ,
737+ 0x30 , 0x30 , 0x75 , 0x53 , 0x2f , 0x32 , 0x35 , 0x46 ,
738+ 0x50 , 0x53 , 0x29
739+ } ,
740+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
741+ {
742+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
743+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
744+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
745+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( GetEndpointTimingDescriptionResponse ) ) ) ;
746+
747+ var obj = dataTreeBranch . ParsedObject as GetEndpointTimingDescriptionResponse ;
748+ Assert . That ( obj , Is . Not . Null ) ;
749+ Assert . That ( obj ! . TimingId , Is . EqualTo ( 3 ) ) ;
750+ Assert . That ( obj . Description , Is . EqualTo ( "Slow (200uS/25FPS)" ) ) ;
751+ } ) ) ;
666752 #endregion
667753
668754 #region ENDPOINT_RESPONDERS
@@ -728,15 +814,75 @@ private static IEnumerable<PayloadToParseBagData> getPayloadList()
728814 #endregion
729815
730816 #region MANUFACTURER_URL
817+ yield return new PayloadToParseBagData (
818+ ERDM_Command . GET_COMMAND_RESPONSE ,
819+ ERDM_Parameter . MANUFACTURER_URL ,
820+ new byte [ ] { 0x68 , 0x74 , 0x74 , 0x70 , 0x73 , 0x3a , 0x2f , 0x2f , 0x65 , 0x78 , 0x61 , 0x6d , 0x70 , 0x6c , 0x65 , 0x2e , 0x63 , 0x6f , 0x6d } ,
821+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
822+ {
823+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
824+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
825+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
826+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( string ) ) ) ;
827+ var obj = dataTreeBranch . ParsedObject as string ;
828+ Assert . That ( obj , Is . Not . Null ) ;
829+ Assert . That ( obj ! , Is . EqualTo ( "https://example.com" ) ) ;
830+ } ) ) ;
731831 #endregion
732832
733833 #region PRODUCT_URL
834+ yield return new PayloadToParseBagData (
835+ ERDM_Command . GET_COMMAND_RESPONSE ,
836+ ERDM_Parameter . PRODUCT_URL ,
837+ new byte [ ] { 0x68 , 0x74 , 0x74 , 0x70 , 0x73 , 0x3a , 0x2f , 0x2f , 0x65 , 0x78 , 0x61 , 0x6d , 0x70 , 0x6c , 0x65 , 0x2e , 0x63 , 0x6f , 0x6d } ,
838+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
839+ {
840+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
841+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
842+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
843+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( string ) ) ) ;
844+ var obj = dataTreeBranch . ParsedObject as string ;
845+ Assert . That ( obj , Is . Not . Null ) ;
846+ Assert . That ( obj ! , Is . EqualTo ( "https://example.com" ) ) ;
847+ } ) ) ;
734848 #endregion
735849
736850 #region FIRMWARE_URL
851+ yield return new PayloadToParseBagData (
852+ ERDM_Command . GET_COMMAND_RESPONSE ,
853+ ERDM_Parameter . FIRMWARE_URL ,
854+ new byte [ ] { 0x68 , 0x74 , 0x74 , 0x70 , 0x73 , 0x3a , 0x2f , 0x2f , 0x65 , 0x78 , 0x61 , 0x6d , 0x70 , 0x6c , 0x65 , 0x2e , 0x63 , 0x6f , 0x6d } ,
855+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
856+ {
857+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
858+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
859+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
860+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( string ) ) ) ;
861+ var obj = dataTreeBranch . ParsedObject as string ;
862+ Assert . That ( obj , Is . Not . Null ) ;
863+ Assert . That ( obj ! , Is . EqualTo ( "https://example.com" ) ) ;
864+ } ) ) ;
737865 #endregion
738866
739867 #region SERIAL_NUMBER
868+ yield return new PayloadToParseBagData (
869+ ERDM_Command . GET_COMMAND_RESPONSE ,
870+ ERDM_Parameter . SERIAL_NUMBER ,
871+ new byte [ ] {
872+ 0x31 , 0x41 , 0x46 , 0x33 , 0x38 , 0x36 , 0x37 , 0x38 ,
873+ 0x30 , 0x30 , 0x33 , 0x30
874+ } ,
875+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
876+ {
877+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
878+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
879+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
880+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( string ) ) ) ;
881+ var obj = dataTreeBranch . ParsedObject as string ;
882+ Assert . That ( obj , Is . Not . Null ) ;
883+ Assert . That ( obj ! , Is . EqualTo ( "1AF386780030" ) ) ;
884+ } ) ) ;
885+
740886 #endregion
741887
742888 #region DEVICE_INFO_OFFSTAGE
@@ -791,6 +937,20 @@ private static IEnumerable<PayloadToParseBagData> getPayloadList()
791937 #endregion
792938
793939 #region METADATA_JSON_URL
940+ yield return new PayloadToParseBagData (
941+ ERDM_Command . GET_COMMAND_RESPONSE ,
942+ ERDM_Parameter . METADATA_JSON_URL ,
943+ new byte [ ] { 0x68 , 0x74 , 0x74 , 0x70 , 0x73 , 0x3a , 0x2f , 0x2f , 0x65 , 0x78 , 0x61 , 0x6d , 0x70 , 0x6c , 0x65 , 0x2e , 0x63 , 0x6f , 0x6d } ,
944+ new Action < DataTreeBranch > ( ( dataTreeBranch ) =>
945+ {
946+ Assert . That ( dataTreeBranch . IsUnset , Is . False ) ;
947+ Assert . That ( dataTreeBranch . IsEmpty , Is . False ) ;
948+ Assert . That ( dataTreeBranch . ParsedObject , Is . Not . Null ) ;
949+ Assert . That ( dataTreeBranch . ParsedObject , Is . TypeOf ( typeof ( string ) ) ) ;
950+ var obj = dataTreeBranch . ParsedObject as string ;
951+ Assert . That ( obj , Is . Not . Null ) ;
952+ Assert . That ( obj ! , Is . EqualTo ( "https://example.com" ) ) ;
953+ } ) ) ;
794954 #endregion
795955 }
796956
@@ -837,7 +997,7 @@ internal PayloadToParseBagData(in ERDM_Command command, in ERDM_Parameter parame
837997
838998 public override string ToString ( )
839999 {
840- return $ "Command: { Command } , Parameter: { Parameter } , Payload: { BitConverter . ToString ( Payload ) } ";
1000+ return $ "{ Parameter } ( { CommandDublicate } ) , Payload: { BitConverter . ToString ( Payload ) } ";
8411001 }
8421002 }
8431003}
0 commit comments