| interface
ViewMemoryConstants integer values and bitflags VIEW_MAX, VIEW_PORT, VIEW_ROM_TAG, DATA_BUFFER_SIZE, OFFSET_LOCAL_VIEWS, OFFSET_EXTERNAL_VIEWS, OFFSET_ATOMIC, OFFSET_VIEW_FLAGS, OFFSET_SERVER_ADDRESS, OFFSET_SERVER_PORT, OFFSET_SERVER_DATA, VIEW_INFO_SIZE, VIEW_INFO_INT_SIZE, OFFSET_INFO_START, OFFSET_DATA_START, VIEW_RECORD_SIZE, VIEW_MEMORY_SIZE, VIEW_INT_SIZE, VIEW_DATA_START, // The actual definitions for inter process memory mapped IO & block data buffer offsets /* Memory map; Atomic block details 4 bytes Local View # 4 bytes Extenal View # 4 bytes Server port # Size = View Blocks * VIEW_MAX public interface ViewMemoryConstants { final static int VIEW_MAX = 0x000000ff; // 255 Views should be enough for most :) // IO Multiplex Packet data offsets final static int VIEW_PORT = 0x00000000; // 32 bit flag as ROM TAG final static int VIEW_ROM_TAG =(int)(('V'<<24)|('I'<<16)|('E'<<8)|'W'); // "Global" bit defs. final static int SERVER_BASE_RUNNING = 0x00000001; final static int SERVER_BASE_SIGNALED = 0x00000002; final static int SHUTDOWN_ALL = 0x00000004; / / final static int DATA_BUFFER_SIZE = 4096; //-------------- Atomic Global info block offsets // Byte # final static int OFFSET_LOCAL_VIEWS = 0x00000000; // 0 final static int OFFSET_EXTERNAL_VIEWS = 0x00000004; // 4 final static int OFFSET_SERVER_ID = 0x00000008; // 8 final static int OFFSET_IO_BLOCK_START = 0x0000000C; // 12 - 0 //------------------ final static int OFFSET_LISTEN_HOST = 0x00000010; // 16 - 4 // View Info block final static int OFFSET_IP_PORT = 0x00000014; // 20 - 8 // final static int OFFSET_PROCESS = 0x00000018; // 24 - 12 // process ID # final static int OFFSET_FLAGS = 0x0000001C; // 28 - 16 // HyperView.memoryFlags final static int OFFSET_IOEND = 0x00000020; // 21 - 20 //^---------------------^ final static int OFFSET_VIEW_END = 0x00000024; // 32 - 24 // end of View info block final static int VIEW_DATA_START = 0x00000028; // 36 - 28 beginning of buffer // Block segment sizes final static int VIEW_INFO_SIZE = OFFSET_VIEW_END-OFFSET_IO_BLOCK_START; final static int VIEW_INFO_INT_SIZE = ((VIEW_INFO_SIZE >> 2) & 0xffffffff); // End of per View data buffer final static int VIEW_RECORD_SIZE = VIEW_DATA_START+DATA_BUFFER_SIZE; // Size of entire memory data block + atomic block final static int VIEW_MEMORY_SIZE = (VIEW_RECORD_SIZE*VIEW_MAX)+OFFSET_IO_BLOCK_START; final static int VIEW_INT_SIZE = (VIEW_MEMORY_SIZE>>>2); // Shared info for HypeView.ioFlags; final static int SERVER_BASE = HyperConstants.SERVER_BASE; // bit 1 final static int START_SERVER_BASE = HyperConstants.START_SERVER_BASE; // bit 2 final static int START_P2P_SERVER = HyperConstants.START_P2P_SERVER; // bit 3 final static int P2P_BASE = HyperConstants.P2P_BASE; // bit 4 final static int EXTERNAL_IO_ENABLE = HyperConstants.EXTERNAL_IO_ENABLE; // ie: allow execing a process. //----- final static int SERVER_MASK = (SERVER_BASE|START_SERVER_BASE); } |