func NewReply(replyForCommand CommandCode, status ReplyStatus, message []byte) *ReplyTelegram {
	return &ReplyTelegram{
		Telegram: &Telegram{
			Type:    Reply,
			Command: replyForCommand,
			Message: message,
		},
		Status: status,
	}
}
NewReply creates a new ReplyTelegram for the given command, status,
and an optional reply message; pass nil if there is no reply message for the command.
package nxt
import (
	"fmt"
	"io"
)
type ReplyStatus byte
const (
	Success                                   ReplyStatus = 0x00
	PendingCommunicationTransactionInProgress             = 0x20
	SpecifiedMailboxQueueIsEmpty                          = 0x40
	RequestFailed                                         = 0xBD
	UnknownCommandOpcode                                  = 0xBE
	InsanePacket                                          = 0xBF
	DataContainsOutOfRangeValues                          = 0xC0
	CommunicationBusError                                 = 0xDD
	NoFreeMemoryInCommunicationBuffer                     = 0xDE
	SpecifiedConnectionIsNotValid                         = 0xDF
	SpecifiedConnectionIsNotConfiguredOrBusy              = 0xE0
	NoActiveProgram                                       = 0xEC
	IllegalSizeSpecified                                  = 0xED
	IllegalMailboxQueueIDSpecified                        = 0xEE
	AttemptedToAccessInvalidFieldOfStructure              = 0xEF
	BadInputOrOutputSpecified                             = 0xF0
	InsufficientMemoryAvailable                           = 0xFB
	BadArguments                                          = 0xFF
)
func (rs ReplyStatus) String() string {
	ReplyStatusMessages := map[ReplyStatus]string{
		Success: "Success",
		PendingCommunicationTransactionInProgress: "Pending communication transaction in progress",
		SpecifiedMailboxQueueIsEmpty:              "Specified mailbox queue is empty",
		RequestFailed:                             "Request failed",
		UnknownCommandOpcode:                      "Unknown command opcode",
		InsanePacket:                              "Insane packet",
		DataContainsOutOfRangeValues:              "Data contains out of range values",
		CommunicationBusError:                     "Communication bus error",
		NoFreeMemoryInCommunicationBuffer:         "No free memory in communication buffer",
		SpecifiedConnectionIsNotValid:             "Specified connection is not valid",
		SpecifiedConnectionIsNotConfiguredOrBusy:  "Specified connection is not configured or busy",
		NoActiveProgram:                           "No active program",
		IllegalSizeSpecified:                      "Illegal size specified",
		IllegalMailboxQueueIDSpecified:            "Illegal mailbox queue ID specified",
		AttemptedToAccessInvalidFieldOfStructure:  "Attempted to access invalid field of structure",
		BadInputOrOutputSpecified:                 "Bad input or output specified",
		InsufficientMemoryAvailable:               "Insufficient memory available",
		BadArguments:                              "Bad arugments",
	}
	return ReplyStatusMessages[rs]
}
type ReplyTelegram struct {
	*Telegram
	Status ReplyStatus
}
func (r ReplyTelegram) String() string {
	return fmt.Sprintf("Status: %v, %v", r.Status, r.Telegram)
}
func (r ReplyTelegram) IsSuccess() bool {
	return r.Status == Success
}