Changeset 6001:872d916b8ca0 in roaraudio for include


Ignore:
Timestamp:
04/06/14 07:00:26 (10 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added some support for CONTROL messages to libroarlight's RoarDMX support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/libroarlight/roardmx.h

    r5976 r6001  
    9999#define ROAR_ROARDMX_EVENT_USER15   0x3F /* User defined event #15 */ 
    100100 
     101/* subcommands for ROAR_ROARDMX_TYPE_CONTROL: */ 
     102#define ROAR_ROARDMX_CTL_VERSION    0x00 /* Version of Codec */ 
     103#define ROAR_ROARDMX_CTL_SYNC       0x01 /* Sync state */ 
     104 
     105/* Flags for ROAR_ROARDMX_CTL_SYNC: */ 
     106#define ROAR_ROARDMX_SYNC_DIRTY     0x01 /* global state is not sync, some more data needs to be send first */ 
     107#define ROAR_ROARDMX_SYNC_CLEAN     0x02 /* global state is sync */ 
     108#define ROAR_ROARDMX_SYNC_SOF       0x03 /* start of frame */ 
     109#define ROAR_ROARDMX_SYNC_EOF       0x04 /* end of frame */ 
     110#define ROAR_ROARDMX_SYNC_CLOCK     0x80 /* clock tick */ 
     111 
    101112// Data format on the wire: 
    102113/* 
     
    130141 * (beat, on, off, hold) and the lower 6 bits to the type of te event. 
    131142 * 
    132  * CONTROL: not implemented. 
     143 * CONTROL: transmit other control information. 
     144 * The body consists of a version byte followed by a command byte. 
     145 * The version byte is always zero by this standard. 
     146 * The command byte is one of ROAR_ROARDMX_CTL_* 
     147 * The rest of body depends on both the version and command byte. 
     148 * For command=VERSION packets the rest of the body is a single byte with the value 
     149 * of zero as of this standard. 
     150 * For command=SYNC packets the rest of the body is a single byte which is a bitarray 
     151 * for flags defined above as ROAR_ROARDMX_SYNC_*. 
    133152 */ 
    134153 
     
    191210 
    192211// * CONTROL: 
    193 // Not yet supported. 
     212int roar_roardmx_message_new_version(struct roar_roardmx_message * mes, uint8_t version); 
     213int roar_roardmx_message_new_sync(struct roar_roardmx_message * mes, uint8_t flags); 
     214int roar_roardmx_message_get_subcommand(struct roar_roardmx_message * mes); 
     215int roar_roardmx_message_get_ctl_version(struct roar_roardmx_message * mes); 
     216int roar_roardmx_message_get_ctl_flags(struct roar_roardmx_message * mes); 
    194217 
    195218#endif 
Note: See TracChangeset for help on using the changeset viewer.