diff --git a/common/JackNetDriver.h b/common/JackNetDriver.h index adbca18d..de00eed2 100644 --- a/common/JackNetDriver.h +++ b/common/JackNetDriver.h @@ -30,6 +30,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. namespace Jack { + /** + \Brief This class describes the Net Backend + */ + class JackNetDriver : public JackAudioDriver { private: diff --git a/common/JackNetManager.h b/common/JackNetManager.h index 117cb3d7..d475d76e 100644 --- a/common/JackNetManager.h +++ b/common/JackNetManager.h @@ -30,6 +30,10 @@ namespace Jack { class JackNetMasterManager; + /** + \Brief This class describes a Net Master + */ + class JackNetMaster { friend class JackNetMasterManager; @@ -108,6 +112,10 @@ namespace Jack typedef std::list master_list_t; typedef master_list_t::iterator master_list_it_t; + /** + \Brief This class describer the Network Manager + */ + class JackNetMasterManager { friend class JackNetMaster; diff --git a/common/JackNetTool.h b/common/JackNetTool.h index 61dc4548..851be48b 100644 --- a/common/JackNetTool.h +++ b/common/JackNetTool.h @@ -39,6 +39,20 @@ namespace Jack //session params ****************************************************************************** +/** +\brief This structure containes master/slave connection parameters, it's used to setup the whole system + +We have : + - some info like version, type and packet id + - names + - network parameters (hostnames and mtu) + - nunber of audio and midi channels + - sample rate and buffersize + - number of audio frames in one network packet (depends on the channel number) + - is the NetDriver in Sync or ASync mode ? + - is the NetDriver linked with the master's transport +*/ + struct _session_params { char fPacketType[7]; //packet type ('param') @@ -63,6 +77,10 @@ namespace Jack //net status ********************************************************************************** +/** +\Brief This enum groups network error by type +*/ + enum _net_status { NET_SOCKET_ERROR = 0, @@ -78,6 +96,10 @@ namespace Jack //sync packet type **************************************************************************** +/** +\Brief This enum indicates the type of a sync packet (used in the initialization phase) +*/ + enum _sync_packet_type { INVALID = 0, //... @@ -93,12 +115,31 @@ namespace Jack //packet header ******************************************************************************* +/** +\Brief This structure is a complete header + +A header indicates : + - it is a header + - the type of data the packet contains (sync, midi or audio) + - the path of the packet (send -master->slave- or return -slave->master-) + - the unique ID of the slave + - the sample's bitdepth (unused for now) + - the size of the midi data contains in the packet (indicates how much midi data will be sent) + - the number of midi packet(s) : more than one is very unusual, it depends on the midi load + - the ID of the current cycle (used to check missing packets) + - the ID of the packet subcycle (for audio data) + - a flag indicating this packet is the last of the cycle (for sync robustness, it's better to process this way) + - a flag indicating if, in async mode, the previous graph was not finished or not + - padding to fill 64 bytes + +*/ + struct _packet_header { char fPacketType[7]; //packet type ( 'headr' ) - char fDataType; //a for audio, m for midi + char fDataType; //a for audio, m for midi and s for sync char fDataStream; //s for send, r for return - uint32_t fID; //to identify the slave + uint32_t fID; //unique ID of the slave uint32_t fBitdepth; //bitdepth of the data samples uint32_t fMidiDataSize; //size of midi data (if packet is 'midi typed') in bytes uint32_t fNMidiPckt; //number of midi packets of the cycle @@ -111,6 +152,10 @@ namespace Jack //transport data ****************************************************************************** +/** +\Brief This structure contains transport info +*/ + struct _net_transport_data { jack_position_t fCurPos; @@ -119,6 +164,21 @@ namespace Jack //midi data *********************************************************************************** +/** +\Brief Midi buffer and operations class + +This class is a toolset to manipulate Midi buffers. +A JackMidiBuffer has a fixed size, which is the same than an audio buffer size. +An intermediate fixed size buffer allows to uninterleave midi data (from jack ports). +But for a big majority of the process cycles, this buffer is filled less than 1%, +Sending over a network 99% of useless data seems completely unappropriate. +The idea is to count effective midi data, and then send the smallest packet we can. +To do it, we use an intermediate buffer. +We have two methods to convert data from jack ports to intermediate buffer, +And two others to convert this intermediate buffer to a network buffer (header + payload data) + +*/ + class EXPORT NetMidiBuffer { private: @@ -150,6 +210,16 @@ namespace Jack // audio data ********************************************************************************* +/** +\Brief Audio buffer and operations class + +This class is a toolset to manipulate audio buffers. +The manipulation of audio buffers is similar to midi buffer, except those buffers have fixed size. +The interleaving/uninterleaving operations are simplier here because audio buffers have fixed size, +So there is no need of an intermediate buffer as in NetMidiBuffer. + +*/ + class EXPORT NetAudioBuffer { private: diff --git a/common/JackTools.h b/common/JackTools.h index 6c1479bf..95f00024 100644 --- a/common/JackTools.h +++ b/common/JackTools.h @@ -90,6 +90,19 @@ namespace Jack /*! \brief Generic monitoring class. Saves data to GnuPlot files ('.plt' and '.log' datafile) + + This template class allows to manipulate monitoring records, and automatically generate the GnuPlot config and data files. + Operations are RT safe because it uses fixed size data buffers. + You can set the number of measure points, and the number of records. + + To use it : + - create a JackGnuPlotMonitor, you can use the data type you want. + - create a temporary array for your measure + - once you have filled this array with 'measure points' value, call write() to add it to the record + - once you've done with your measurment, just call save() to save your data file + + You can also call SetPlotFile() to automatically generate '.plt' file from an options list. + */ template class JackGnuPlotMonitor diff --git a/windows/jackdmp.workspace b/windows/jackdmp.workspace index 9b4ebdaf..9938bff0 100644 --- a/windows/jackdmp.workspace +++ b/windows/jackdmp.workspace @@ -16,7 +16,9 @@ - + + +