jdkmidi class library documentation

Copyright © 2004 J.D. Koftinoff Software, Ltd.

Released under the GNU General Public License (GPL)




Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

jdkmidi::MIDISystemExclusive Class Reference

#include <sysex.h>

List of all members.

Public Member Functions

 MIDISystemExclusive (int size=384)
 MIDISystemExclusive (const MIDISystemExclusive &e)
 MIDISystemExclusive (unsigned char *buf_, int max_len_, int cur_len_, bool deletable_)
virtual ~MIDISystemExclusive ()
void Clear ()
void ClearChecksum ()
void PutSysByte (unsigned char b)
void PutByte (unsigned char b)
void PutEXC ()
void PutEOX ()
void PutNibblizedByte (unsigned char b)
void PutNibblizedByte2 (unsigned char b)
void PutChecksum ()
unsigned char GetChecksum () const
int GetLength () const
unsigned char GetData (int i) const
bool IsFull () const
unsigned char * GetBuf ()
const unsigned char * GetBuf () const

Private Attributes

unsigned char * buf
int max_len
int cur_len
unsigned char chk_sum
bool deletable


Constructor & Destructor Documentation

jdkmidi::MIDISystemExclusive::MIDISystemExclusive int  size = 384  ) 
 

Definition at line 52 of file jdkmidi_sysex.cpp.

References buf, chk_sum, cur_len, deletable, ENTER, max_len, and uchar.

00053   {
00054     ENTER( "MIDISystemExclusive::MIDISystemExclusive" );
00055     
00056     buf=new uchar[size_];
00057     
00058     if( buf )
00059       max_len=size_;
00060     else
00061       max_len=0;
00062     
00063     cur_len=0;
00064     chk_sum=0;
00065     deletable=true;
00066   }

jdkmidi::MIDISystemExclusive::MIDISystemExclusive const MIDISystemExclusive e  ) 
 

Definition at line 68 of file jdkmidi_sysex.cpp.

References buf, chk_sum, cur_len, deletable, and max_len.

00069   {
00070     buf = new unsigned char [e.max_len];
00071     max_len = e.max_len;
00072     cur_len = e.cur_len;
00073     chk_sum = e.chk_sum;
00074     deletable = true;
00075     
00076     for( int i=0; i<cur_len; ++i )
00077     {
00078       buf[i] = e.buf[i];
00079     }
00080   } 

jdkmidi::MIDISystemExclusive::MIDISystemExclusive unsigned char *  buf_,
int  max_len_,
int  cur_len_,
bool  deletable_
[inline]
 

Definition at line 50 of file sysex.h.

References buf, chk_sum, cur_len, deletable, and max_len.

00056         {
00057           buf=buf_;
00058           max_len=max_len_;
00059           cur_len=cur_len_;
00060           chk_sum=0;
00061           deletable=deletable_;
00062         } 

jdkmidi::MIDISystemExclusive::~MIDISystemExclusive  )  [virtual]
 

Definition at line 82 of file jdkmidi_sysex.cpp.

References buf, deletable, and ENTER.

00083   {
00084     ENTER( "MIDISystemExclusive::~MIDISystemExclusive" );
00085     
00086     if( deletable )
00087       delete [] buf;
00088   }


Member Function Documentation

void jdkmidi::MIDISystemExclusive::Clear  )  [inline]
 

Definition at line 66 of file sysex.h.

References chk_sum, and cur_len.

00066 { cur_len=0; chk_sum=0; }

void jdkmidi::MIDISystemExclusive::ClearChecksum  )  [inline]
 

Definition at line 67 of file sysex.h.

References chk_sum.

00067 { chk_sum=0;      }

const unsigned char* jdkmidi::MIDISystemExclusive::GetBuf  )  const [inline]
 

Definition at line 128 of file sysex.h.

References buf.

00129         {
00130           return buf;
00131         } 

unsigned char* jdkmidi::MIDISystemExclusive::GetBuf  )  [inline]
 

Definition at line 123 of file sysex.h.

References buf.

00124         {
00125           return buf;
00126         } 

unsigned char jdkmidi::MIDISystemExclusive::GetChecksum  )  const [inline]
 

Definition at line 103 of file sysex.h.

References chk_sum.

00104         {
00105           return (unsigned char)(chk_sum&0x7f);   
00106         } 

unsigned char jdkmidi::MIDISystemExclusive::GetData int  i  )  const [inline]
 

Definition at line 113 of file sysex.h.

References buf.

00114         { 
00115           return buf[i];  
00116         } 

int jdkmidi::MIDISystemExclusive::GetLength  )  const [inline]
 

Definition at line 108 of file sysex.h.

References cur_len.

00109         { 
00110           return cur_len; 
00111         } 

bool jdkmidi::MIDISystemExclusive::IsFull  )  const [inline]
 

Definition at line 118 of file sysex.h.

References cur_len, and max_len.

00119         { 
00120           return cur_len>=max_len;  
00121         } 

void jdkmidi::MIDISystemExclusive::PutByte unsigned char  b  )  [inline]
 

Definition at line 75 of file sysex.h.

References chk_sum, and PutSysByte().

00076         {
00077           PutSysByte(b);
00078           chk_sum+=b;
00079         } 

void jdkmidi::MIDISystemExclusive::PutChecksum  )  [inline]
 

Definition at line 98 of file sysex.h.

References chk_sum, and PutByte().

00099         { 
00100           PutByte( (unsigned char)(chk_sum&0x7f )); 
00101         } 

void jdkmidi::MIDISystemExclusive::PutEOX  )  [inline]
 

Definition at line 82 of file sysex.h.

References PutSysByte(), and jdkmidi::SYSEX_END.

00082 { PutSysByte( SYSEX_END );  }

void jdkmidi::MIDISystemExclusive::PutEXC  )  [inline]
 

Definition at line 81 of file sysex.h.

References PutSysByte(), and jdkmidi::SYSEX_START.

00081 { PutSysByte( SYSEX_START );  }  

void jdkmidi::MIDISystemExclusive::PutNibblizedByte unsigned char  b  )  [inline]
 

Definition at line 85 of file sysex.h.

References PutByte().

00086         {
00087           PutByte( (unsigned char)(b&0xf) );
00088           PutByte( (unsigned char)(b>>4) );
00089         } 

void jdkmidi::MIDISystemExclusive::PutNibblizedByte2 unsigned char  b  )  [inline]
 

Definition at line 92 of file sysex.h.

References PutByte().

00093         {
00094           PutByte( (unsigned char)(b>>4) );
00095           PutByte( (unsigned char)(b&0xf) );
00096         } 

void jdkmidi::MIDISystemExclusive::PutSysByte unsigned char  b  )  [inline]
 

Definition at line 69 of file sysex.h.

References buf, cur_len, and max_len.

00070         {
00071           if( cur_len<max_len )
00072             buf[cur_len++]=b;
00073         } 


Member Data Documentation

unsigned char* jdkmidi::MIDISystemExclusive::buf [private]
 

Definition at line 135 of file sysex.h.

unsigned char jdkmidi::MIDISystemExclusive::chk_sum [private]
 

Definition at line 138 of file sysex.h.

int jdkmidi::MIDISystemExclusive::cur_len [private]
 

Definition at line 137 of file sysex.h.

bool jdkmidi::MIDISystemExclusive::deletable [private]
 

Definition at line 139 of file sysex.h.

int jdkmidi::MIDISystemExclusive::max_len [private]
 

Definition at line 136 of file sysex.h.


The documentation for this class was generated from the following files: