@@ -41,8 +41,47 @@ public Device() : base(WhoAmI) { }
4141 { 33 , typeof ( DigitalOutputState ) } ,
4242 { 34 , typeof ( DigitalInputsSamplingMode ) } ,
4343 { 35 , typeof ( DO0Config ) } ,
44+ { 36 , typeof ( Reserved0 ) } ,
45+ { 37 , typeof ( Reserved1 ) } ,
46+ { 38 , typeof ( Reserved2 ) } ,
47+ { 39 , typeof ( Reserved3 ) } ,
4448 { 40 , typeof ( EnableEvents ) }
4549 } ;
50+
51+ /// <summary>
52+ /// Gets the contents of the metadata file describing the <see cref="Synchronizer"/>
53+ /// device registers.
54+ /// </summary>
55+ public static readonly string Metadata = GetDeviceMetadata ( ) ;
56+
57+ static string GetDeviceMetadata ( )
58+ {
59+ var deviceType = typeof ( Device ) ;
60+ using var metadataStream = deviceType . Assembly . GetManifestResourceStream ( $ "{ deviceType . Namespace } .device.yml") ;
61+ using var streamReader = new System . IO . StreamReader ( metadataStream ) ;
62+ return streamReader . ReadToEnd ( ) ;
63+ }
64+ }
65+
66+ /// <summary>
67+ /// Represents an operator that returns the contents of the metadata file
68+ /// describing the <see cref="Synchronizer"/> device registers.
69+ /// </summary>
70+ [ Description ( "Returns the contents of the metadata file describing the Synchronizer device registers." ) ]
71+ public partial class GetMetadata : Source < string >
72+ {
73+ /// <summary>
74+ /// Returns an observable sequence with the contents of the metadata file
75+ /// describing the <see cref="Synchronizer"/> device registers.
76+ /// </summary>
77+ /// <returns>
78+ /// A sequence with a single <see cref="string"/> object representing the
79+ /// contents of the metadata file.
80+ /// </returns>
81+ public override IObservable < string > Generate ( )
82+ {
83+ return Observable . Return ( Device . Metadata ) ;
84+ }
4685 }
4786
4887 /// <summary>
@@ -546,6 +585,94 @@ public static Timestamped<DO0ConfigMode> GetPayload(HarpMessage message)
546585 }
547586 }
548587
588+ /// <summary>
589+ /// Represents a register that reserved for future use.
590+ /// </summary>
591+ [ Description ( "Reserved for future use." ) ]
592+ internal partial class Reserved0
593+ {
594+ /// <summary>
595+ /// Represents the address of the <see cref="Reserved0"/> register. This field is constant.
596+ /// </summary>
597+ public const int Address = 36 ;
598+
599+ /// <summary>
600+ /// Represents the payload type of the <see cref="Reserved0"/> register. This field is constant.
601+ /// </summary>
602+ public const PayloadType RegisterType = PayloadType . U8 ;
603+
604+ /// <summary>
605+ /// Represents the length of the <see cref="Reserved0"/> register. This field is constant.
606+ /// </summary>
607+ public const int RegisterLength = 1 ;
608+ }
609+
610+ /// <summary>
611+ /// Represents a register that reserved for future use.
612+ /// </summary>
613+ [ Description ( "Reserved for future use." ) ]
614+ internal partial class Reserved1
615+ {
616+ /// <summary>
617+ /// Represents the address of the <see cref="Reserved1"/> register. This field is constant.
618+ /// </summary>
619+ public const int Address = 37 ;
620+
621+ /// <summary>
622+ /// Represents the payload type of the <see cref="Reserved1"/> register. This field is constant.
623+ /// </summary>
624+ public const PayloadType RegisterType = PayloadType . U8 ;
625+
626+ /// <summary>
627+ /// Represents the length of the <see cref="Reserved1"/> register. This field is constant.
628+ /// </summary>
629+ public const int RegisterLength = 1 ;
630+ }
631+
632+ /// <summary>
633+ /// Represents a register that reserved for future use.
634+ /// </summary>
635+ [ Description ( "Reserved for future use." ) ]
636+ internal partial class Reserved2
637+ {
638+ /// <summary>
639+ /// Represents the address of the <see cref="Reserved2"/> register. This field is constant.
640+ /// </summary>
641+ public const int Address = 38 ;
642+
643+ /// <summary>
644+ /// Represents the payload type of the <see cref="Reserved2"/> register. This field is constant.
645+ /// </summary>
646+ public const PayloadType RegisterType = PayloadType . U8 ;
647+
648+ /// <summary>
649+ /// Represents the length of the <see cref="Reserved2"/> register. This field is constant.
650+ /// </summary>
651+ public const int RegisterLength = 1 ;
652+ }
653+
654+ /// <summary>
655+ /// Represents a register that reserved for future use.
656+ /// </summary>
657+ [ Description ( "Reserved for future use." ) ]
658+ internal partial class Reserved3
659+ {
660+ /// <summary>
661+ /// Represents the address of the <see cref="Reserved3"/> register. This field is constant.
662+ /// </summary>
663+ public const int Address = 39 ;
664+
665+ /// <summary>
666+ /// Represents the payload type of the <see cref="Reserved3"/> register. This field is constant.
667+ /// </summary>
668+ public const PayloadType RegisterType = PayloadType . U8 ;
669+
670+ /// <summary>
671+ /// Represents the length of the <see cref="Reserved3"/> register. This field is constant.
672+ /// </summary>
673+ public const int RegisterLength = 1 ;
674+ }
675+
549676 /// <summary>
550677 /// Represents a register that specifies all the active events in the device.
551678 /// </summary>
0 commit comments