Class IOBuffer
java.lang.Object
uk.ac.manchester.spinnaker.messages.model.IOBuffer
- All Implemented Interfaces:
HasChipLocation,HasCoreLocation
The contents of IOBUF for a core.
- Author:
- Donal Fellows
-
Constructor Summary
ConstructorsConstructorDescriptionIOBuffer(HasCoreLocation core, byte[] contents) IOBuffer(HasCoreLocation core, Iterable<ByteBuffer> contents) IOBuffer(HasCoreLocation core, ByteBuffer contents) -
Method Summary
Modifier and TypeMethodDescriptiongetContentsString(Charset charset) Get the contents of the buffer as a string.intgetP()intgetX()intgetY()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.ac.manchester.spinnaker.machine.HasChipLocation
asChipLocation, getScampCore, onSameChipAsMethods inherited from interface uk.ac.manchester.spinnaker.machine.HasCoreLocation
asCoreLocation, onSameCoreAs
-
Constructor Details
-
IOBuffer
- Parameters:
core- The coordinates of a corecontents- The contents of the buffer for the chip
-
IOBuffer
- Parameters:
core- The coordinates of a corecontents- The contents of the buffer for the chip
-
IOBuffer
- Parameters:
core- The coordinates of a corecontents- The contents of the buffer for the chip
-
-
Method Details
-
getX
public int getX()- Specified by:
getXin interfaceHasChipLocation
-
getY
public int getY()- Specified by:
getYin interfaceHasChipLocation
-
getP
public int getP()- Specified by:
getPin interfaceHasCoreLocation
-
getContentsStream
- Returns:
- The raw contents of the buffer as an input stream.
-
getContentsBuffer
- Returns:
- The raw contents of the buffer as a read-only little-endian byte buffer.
-
getContentsString
- Returns:
- The contents of the buffer as a string, interpreting it as ASCII.
-
getContentsString
Get the contents of the buffer as a string.- Parameters:
charset- How to decode bytes into characters.- Returns:
- The contents of the buffer as a string in the specified encoding.
-