|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--VDMFec_JNI
This is an erasure code based on Vandermonde matrices class.
WARNING: the following class can be much more lower than native implementation due to the Java Virtual Machine, furthermore this is only encapsulation of native code, hence portability of original code is NOT improve.
Field Summary | |
static int |
GF_BITS
The following parameter defines how many bits are used for field elements. |
static int |
KK
Number of maximum source packets Must be inferior to 255, use in main test programme |
static int |
SZ
Size of packet Size in bytes of each packet to generate |
Constructor Summary | |
VDMFec_JNI()
|
Method Summary | |
static int |
fec_decode(int code,
byte[][] pkt,
int[] index,
int sz)
fec_decode : decode fec packets of the session |
static void |
fec_encode(int code,
byte[][] src,
byte[] fec,
int index,
int sz)
fec_encode : encode one fec packet |
static void |
fec_free(int p)
fec_free : free some space Function allowing to free memory allocated in native environement |
static int |
fec_new(int k,
int n)
fec_new : create a new encoder for a fec session This contains k,n and the encoding matrix. |
static void |
init_fec()
init_fec : initialize fec sessions |
static void |
main(java.lang.String[] args)
main : main function, launched from Java Virtual Machine Create k packets of size sz of random data, encodes them, and tries to decode. |
static int |
test_decode(int code,
int k,
int[] index,
int sz,
java.lang.String s)
test_decode : test function of VDM Library the following is only test code and can be safely omitted in applications. |
static void |
TICK(long[] t,
int index)
TICK : Take a timestamp |
static void |
TOCK(long[] t,
int index)
TOCK : Compute a time interval |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int GF_BITS
public static final int KK
Must be inferior to 255, use in main test programme
public static final int SZ
Size in bytes of each packet to generate
Constructor Detail |
public VDMFec_JNI()
Method Detail |
public static void TICK(long[] t, int index)
t
- (IN) array of reference timesindex
- (IN) position in t where to put the new referencepublic static void TOCK(long[] t, int index)
t
- (IN) array of reference timesindex
- (IN) position in t where old reference is and where new reference will be putpublic static int fec_new(int k, int n)
This contains k,n and the encoding matrix.
public static void fec_free(int p)
Function allowing to free memory allocated in native environement
p
- (IN) descriptor of the (struc fec_parms *) native typepublic static void init_fec()
public static void fec_encode(int code, byte[][] src, byte[] fec, int index, int sz)
code
- (IN) descriptor of the (struc fec_parms *) native typesrc
- (IN) pointer to n data packetsdst
- (OUT) pointer to computed output packetindex
- (IN) value used for computationsz
- (IN) size of each packetspublic static int fec_decode(int code, byte[][] pkt, int[] index, int sz)
code
- (IN) pointer to code descriptorpkt
- (IN-OUT) pointers to received packetsindex
- (IN) values used for computationsz
- (IN) size of each packet
public static int test_decode(int code, int k, int[] index, int sz, java.lang.String s)
the following is only test code and can be safely omitted in applications. Creates k packets of size sz of random data, encodes them, and tries to decode. Index contains the permutation entry.
code
- (IN) pointer to code descriptork
- (IN) number of maximum source packetsindex
- (IN) value used for computationsz
- (IN) size of each packets
- (IN) description of the test
public static void main(java.lang.String[] args)
Create k packets of size sz of random data, encodes them, and tries to decode. Index contains the permutation entry.
args
- (IN) arguments of function (not used)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |