Get/Set Methods
The simplest ways to access raw memory through a RawMemoryAccess object are the primitive get/set methods:
public byte getByte(long offset)
public void setByte(long offset, byte value)
public short getShort(long offset)
public void setShort(long offset, short value)
public int getInt(long offset)
public void setInt(long offset, int value)
public long getLong(long offset)
public void setLong(long offset, long value)
All the methods that read and write multibyte values interact with the BYTE_ORDER static variable in the RealtimeSystem class. If BYTE_ORDER equals BIG_ENDIAN, then the high-order byte is at the low address; otherwise, the high-order byte is at the high address.
You use these methods like this:
public void init(){ try { // ...
Get Real-Time Java™ Platform Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.