void OutboundPacketStream::CheckForAvailableBundleSpace()
{
    unsigned long required = Size() + ((ElementSizeSlotRequired())?4:0) + 16;

    if( required > Capacity() )
        throw OutOfBufferMemoryException();
}
	void NxDeviceOscOutputMessage::CheckForAvailableBundleSpace()
	{
		unsigned long required = Size() + ((ElementSizeSlotRequired())?4:0) + 16;

		if( required > Capacity() )
			throw OutOfBufferMemoryException();
	}
Errors OutboundPacketStream::CheckForAvailableMessageSpace( const char *addressPattern )
{
    // plus 4 for at least four bytes of type tag
    std::size_t required = Size() + ((ElementSizeSlotRequired())?4:0)
            + RoundUp4(std::strlen(addressPattern) + 1) + 4;

    return (required > Capacity()) ? OUT_OF_BUFFER_MEMORY_ERROR : SUCCESS;
}
예제 #4
0
void OutboundPacketStream::CheckForAvailableMessageSpace( const char *addressPattern )
{
    // plus 4 for at least four bytes of type tag
    unsigned long required = Size() + ((ElementSizeSlotRequired()) ? 4 : 0) + RoundUp4(static_cast<unsigned long>(strlen(addressPattern)) + 1) + 4;

    if( required > Capacity() )
        throw OutOfBufferMemoryException();
}
	void NxDeviceOscOutputMessage::CheckForAvailableMessageSpace( const char *addressPattern )
	{
		// plus 4 for at least four bytes of type tag
		unsigned long required = Size() + ((ElementSizeSlotRequired())?4:0)
			+ RoundUp4(strlen(addressPattern) + 1) + 4;

		if( required > Capacity() )
			throw OutOfBufferMemoryException();
	}
Errors OutboundPacketStream::CheckForAvailableBundleSpace()
{
    std::size_t required = Size() + ((ElementSizeSlotRequired())?4:0) + 16;
    return (required > Capacity()) ? OUT_OF_BUFFER_MEMORY_ERROR : SUCCESS;
}