@@ -69,8 +69,44 @@ public Device() : base(WhoAmI) { }
6969 { 61 , typeof ( AuxDigitalOutputState ) } ,
7070 { 62 , typeof ( AuxLedPower ) } ,
7171 { 63 , typeof ( DigitalOutputState ) } ,
72+ { 64 , typeof ( Reserved0 ) } ,
7273 { 65 , typeof ( EnableEvents ) }
7374 } ;
75+
76+ /// <summary>
77+ /// Gets the contents of the metadata file describing the <see cref="LedArray"/>
78+ /// device registers.
79+ /// </summary>
80+ public static readonly string Metadata = GetDeviceMetadata ( ) ;
81+
82+ static string GetDeviceMetadata ( )
83+ {
84+ var deviceType = typeof ( Device ) ;
85+ using var metadataStream = deviceType . Assembly . GetManifestResourceStream ( $ "{ deviceType . Namespace } .device.yml") ;
86+ using var streamReader = new System . IO . StreamReader ( metadataStream ) ;
87+ return streamReader . ReadToEnd ( ) ;
88+ }
89+ }
90+
91+ /// <summary>
92+ /// Represents an operator that returns the contents of the metadata file
93+ /// describing the <see cref="LedArray"/> device registers.
94+ /// </summary>
95+ [ Description ( "Returns the contents of the metadata file describing the LedArray device registers." ) ]
96+ public partial class GetMetadata : Source < string >
97+ {
98+ /// <summary>
99+ /// Returns an observable sequence with the contents of the metadata file
100+ /// describing the <see cref="LedArray"/> device registers.
101+ /// </summary>
102+ /// <returns>
103+ /// A sequence with a single <see cref="string"/> object representing the
104+ /// contents of the metadata file.
105+ /// </returns>
106+ public override IObservable < string > Generate ( )
107+ {
108+ return Observable . Return ( Device . Metadata ) ;
109+ }
74110 }
75111
76112 /// <summary>
@@ -3511,6 +3547,28 @@ public static Timestamped<DigitalOutputs> GetPayload(HarpMessage message)
35113547 }
35123548 }
35133549
3550+ /// <summary>
3551+ /// Represents a register that reserved for future use.
3552+ /// </summary>
3553+ [ Description ( "Reserved for future use" ) ]
3554+ internal partial class Reserved0
3555+ {
3556+ /// <summary>
3557+ /// Represents the address of the <see cref="Reserved0"/> register. This field is constant.
3558+ /// </summary>
3559+ public const int Address = 64 ;
3560+
3561+ /// <summary>
3562+ /// Represents the payload type of the <see cref="Reserved0"/> register. This field is constant.
3563+ /// </summary>
3564+ public const PayloadType RegisterType = PayloadType . U8 ;
3565+
3566+ /// <summary>
3567+ /// Represents the length of the <see cref="Reserved0"/> register. This field is constant.
3568+ /// </summary>
3569+ public const int RegisterLength = 1 ;
3570+ }
3571+
35143572 /// <summary>
35153573 /// Represents a register that specifies all the active events in the device.
35163574 /// </summary>
@@ -5599,6 +5657,22 @@ public DigitalOutputSyncPayload(
55995657 /// Configuration of the DO1 functionality.
56005658 /// </summary>
56015659 public DO1SyncConfig DO1Sync ;
5660+
5661+ /// <summary>
5662+ /// Returns a <see cref="string"/> that represents the payload of
5663+ /// the DigitalOutputSync register.
5664+ /// </summary>
5665+ /// <returns>
5666+ /// A <see cref="string"/> that represents the payload of the
5667+ /// DigitalOutputSync register.
5668+ /// </returns>
5669+ public override string ToString ( )
5670+ {
5671+ return "DigitalOutputSyncPayload { " +
5672+ "DO0Sync = " + DO0Sync + ", " +
5673+ "DO1Sync = " + DO1Sync + " " +
5674+ "}" ;
5675+ }
56025676 }
56035677
56045678 /// <summary>
@@ -5628,6 +5702,22 @@ public DigitalInputTriggerPayload(
56285702 /// Configuration of the DI1 input pin.
56295703 /// </summary>
56305704 public DigitalInputTriggerConfig DI1Trigger ;
5705+
5706+ /// <summary>
5707+ /// Returns a <see cref="string"/> that represents the payload of
5708+ /// the DigitalInputTrigger register.
5709+ /// </summary>
5710+ /// <returns>
5711+ /// A <see cref="string"/> that represents the payload of the
5712+ /// DigitalInputTrigger register.
5713+ /// </returns>
5714+ public override string ToString ( )
5715+ {
5716+ return "DigitalInputTriggerPayload { " +
5717+ "DI0Trigger = " + DI0Trigger + ", " +
5718+ "DI1Trigger = " + DI1Trigger + " " +
5719+ "}" ;
5720+ }
56315721 }
56325722
56335723 /// <summary>
@@ -5657,6 +5747,22 @@ public PulseModePayload(
56575747 /// Sets the pulse mode used in LED0
56585748 /// </summary>
56595749 public PulseModeConfig Led1Mode ;
5750+
5751+ /// <summary>
5752+ /// Returns a <see cref="string"/> that represents the payload of
5753+ /// the PulseMode register.
5754+ /// </summary>
5755+ /// <returns>
5756+ /// A <see cref="string"/> that represents the payload of the
5757+ /// PulseMode register.
5758+ /// </returns>
5759+ public override string ToString ( )
5760+ {
5761+ return "PulseModePayload { " +
5762+ "Led0Mode = " + Led0Mode + ", " +
5763+ "Led1Mode = " + Led1Mode + " " +
5764+ "}" ;
5765+ }
56605766 }
56615767
56625768 /// <summary>
0 commit comments