@@ -12,7 +12,7 @@ mod tune_request {
1212 system_common:: { self , UMP_MESSAGE_TYPE } ,
1313 } ;
1414 pub ( crate ) const STATUS : u8 = 0xF6 ;
15- /// MIDI 2.0 Channel Voice Tune Request Message
15+ /// Tune Request Message
1616 ///
1717 /// See the [module docs](crate::system_common) for more info.
1818 #[ midi2_proc:: generate_message(
@@ -36,14 +36,14 @@ mod timing_clock {
3636 system_common:: { self , UMP_MESSAGE_TYPE } ,
3737 } ;
3838 pub ( crate ) const STATUS : u8 = 0xF8 ;
39- /// MIDI 2.0 Channel Voice Timing Clock Message
39+ /// Timing Clock Message
4040 ///
4141 /// See the [module docs](crate::system_common) for more info.
4242 #[ midi2_proc:: generate_message(
4343 Via ( system_common:: SystemCommon ) ,
4444 FixedSize ,
4545 MinSizeUmp ( 1 ) ,
46- MinSizeBytes ( 2 )
46+ MinSizeBytes ( 1 )
4747 ) ]
4848 struct TimingClock {
4949 #[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -60,14 +60,14 @@ mod start {
6060 system_common:: { self , UMP_MESSAGE_TYPE } ,
6161 } ;
6262 pub ( crate ) const STATUS : u8 = 0xFA ;
63- /// MIDI 2.0 Channel Voice Start Message
63+ /// Start Message
6464 ///
6565 /// See the [module docs](crate::system_common) for more info.
6666 #[ midi2_proc:: generate_message(
6767 Via ( system_common:: SystemCommon ) ,
6868 FixedSize ,
6969 MinSizeUmp ( 1 ) ,
70- MinSizeBytes ( 2 )
70+ MinSizeBytes ( 1 )
7171 ) ]
7272 struct Start {
7373 #[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -84,14 +84,14 @@ mod cont {
8484 system_common:: { self , UMP_MESSAGE_TYPE } ,
8585 } ;
8686 pub ( crate ) const STATUS : u8 = 0xFB ;
87- /// MIDI 2.0 Channel Voice Continue Message
87+ /// Continue Message
8888 ///
8989 /// See the [module docs](crate::system_common) for more info.
9090 #[ midi2_proc:: generate_message(
9191 Via ( system_common:: SystemCommon ) ,
9292 FixedSize ,
9393 MinSizeUmp ( 1 ) ,
94- MinSizeBytes ( 2 )
94+ MinSizeBytes ( 1 )
9595 ) ]
9696 struct Continue {
9797 #[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -108,14 +108,14 @@ mod stop {
108108 system_common:: { self , UMP_MESSAGE_TYPE } ,
109109 } ;
110110 pub ( crate ) const STATUS : u8 = 0xFC ;
111- /// MIDI 2.0 Channel Voice Stop Message
111+ /// Stop Message
112112 ///
113113 /// See the [module docs](crate::system_common) for more info.
114114 #[ midi2_proc:: generate_message(
115115 Via ( system_common:: SystemCommon ) ,
116116 FixedSize ,
117117 MinSizeUmp ( 1 ) ,
118- MinSizeBytes ( 2 )
118+ MinSizeBytes ( 1 )
119119 ) ]
120120 struct Stop {
121121 #[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -132,14 +132,14 @@ mod active_sensing {
132132 system_common:: { self , UMP_MESSAGE_TYPE } ,
133133 } ;
134134 pub ( crate ) const STATUS : u8 = 0xFE ;
135- /// MIDI 2.0 Channel Voice Active Sensing Message
135+ /// Active Sensing Message
136136 ///
137137 /// See the [module docs](crate::system_common) for more info.
138138 #[ midi2_proc:: generate_message(
139139 Via ( system_common:: SystemCommon ) ,
140140 FixedSize ,
141141 MinSizeUmp ( 1 ) ,
142- MinSizeBytes ( 2 )
142+ MinSizeBytes ( 1 )
143143 ) ]
144144 struct ActiveSensing {
145145 #[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -156,14 +156,14 @@ mod reset {
156156 system_common:: { self , UMP_MESSAGE_TYPE } ,
157157 } ;
158158 pub ( crate ) const STATUS : u8 = 0xFF ;
159- /// MIDI 2.0 Channel Voice Reset Message
159+ /// Reset Message
160160 ///
161161 /// See the [module docs](crate::system_common) for more info.
162162 #[ midi2_proc:: generate_message(
163163 Via ( system_common:: SystemCommon ) ,
164164 FixedSize ,
165165 MinSizeUmp ( 1 ) ,
166- MinSizeBytes ( 2 )
166+ MinSizeBytes ( 1 )
167167 ) ]
168168 struct Reset {
169169 #[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -308,6 +308,60 @@ mod tests {
308308 use super :: * ;
309309 use pretty_assertions:: assert_eq;
310310
311+ #[ test]
312+ fn timing_clock_bytes_data ( ) {
313+ use crate :: Data ;
314+ assert_eq ! (
315+ TimingClock :: try_from( & [ 0xF8_u8 ] [ ..] ) . unwrap( ) . data( ) ,
316+ & [ 0xF8_u8 ] [ ..]
317+ ) ;
318+ }
319+
320+ #[ test]
321+ fn start_bytes_data ( ) {
322+ use crate :: Data ;
323+ assert_eq ! (
324+ Start :: try_from( & [ 0xFA_u8 ] [ ..] ) . unwrap( ) . data( ) ,
325+ & [ 0xFA_u8 ] [ ..]
326+ ) ;
327+ }
328+
329+ #[ test]
330+ fn continue_bytes_data ( ) {
331+ use crate :: Data ;
332+ assert_eq ! (
333+ Continue :: try_from( & [ 0xFB_u8 ] [ ..] ) . unwrap( ) . data( ) ,
334+ & [ 0xFB_u8 ] [ ..]
335+ ) ;
336+ }
337+
338+ #[ test]
339+ fn stop_bytes_data ( ) {
340+ use crate :: Data ;
341+ assert_eq ! (
342+ Stop :: try_from( & [ 0xFC_u8 ] [ ..] ) . unwrap( ) . data( ) ,
343+ & [ 0xFC_u8 ] [ ..]
344+ ) ;
345+ }
346+
347+ #[ test]
348+ fn active_sensing_bytes_data ( ) {
349+ use crate :: Data ;
350+ assert_eq ! (
351+ ActiveSensing :: try_from( & [ 0xFE_u8 ] [ ..] ) . unwrap( ) . data( ) ,
352+ & [ 0xFE_u8 ] [ ..]
353+ ) ;
354+ }
355+
356+ #[ test]
357+ fn reset_bytes_data ( ) {
358+ use crate :: Data ;
359+ assert_eq ! (
360+ Reset :: try_from( & [ 0xFF_u8 ] [ ..] ) . unwrap( ) . data( ) ,
361+ & [ 0xFF_u8 ] [ ..]
362+ ) ;
363+ }
364+
311365 #[ test]
312366 fn from_byte_data ( ) {
313367 assert_eq ! (
0 commit comments