Many devices support both get & set for the same command. The convention is that setters use the 0x00..0x7F range, and they are mirrored by getters in the 0x80..0xFF range. At the low level this means you can check the msb to determine if it's a get or set.
The convention is also that it is the last argument of the set-args, that is to be queried. eg:
SET( a, b, c )
GET( a, b ) -> c
set_pitch( instrument, voice, pitch )
get_pitch( instrument, voice ) -> pitch
The benefit from an implementation perspective is a single description of a command can be used to generate both getters & setters, by stating that the command supports this convention. See the crow descriptor for W/ for an example where the get = true flag states both get&set should be generated.
Many devices support both get & set for the same command. The convention is that setters use the
0x00..0x7F
range, and they are mirrored by getters in the0x80..0xFF
range. At the low level this means you can check the msb to determine if it's a get or set.The convention is also that it is the last argument of the set-args, that is to be queried. eg:
The benefit from an implementation perspective is a single description of a command can be used to generate both getters & setters, by stating that the command supports this convention. See the crow descriptor for W/ for an example where the
get = true
flag states both get&set should be generated.