func (s Status) Error() error {
	if s != StatusSuccess {
		return fmt.Errorf("ZNP status: %s", s.String())
	}
	return nil
}
converts Status to Go error
package znp
import (
	"fmt"
)
type Latency uint8
const (
	LatencyNoLatency Latency = iota
	LatencyFastBeacons
	LatencySlowBeacons
)
type StartupFromAppStatus uint8
const (
	StartupFromAppStatusRestoredNetworkState StartupFromAppStatus = 0x00
	StartupFromAppStatusNewNetworkState      StartupFromAppStatus = 0x01
	StartupFromAppStatusLeaveAndNotStarted   StartupFromAppStatus = 0x02
)
type Status uint8
const (
	StatusSuccess          Status = 0x00
	StatusFailure          Status = 0x01
	StatusInvalidParameter Status = 0x02
	StatusItemCreatedAndInitialized Status = 0x09
	StatusInitializationFailed      Status = 0x0a
	StatusBadLength                 Status = 0x0c
	StatusMemError        Status = 0x10
	StatusBufferFull      Status = 0x11
	StatusUnsupportedMode Status = 0x12
	StatusMacMemError     Status = 0x13
	StatusSapiInProgress Status = 0x20
	StatusSapiTimeout    Status = 0x21
	StatusSapiInit       Status = 0x22
	StatusNotAuthorized Status = 0x7E
	StatusMalformedCmd    Status = 0x80
	StatusUnsupClusterCmd Status = 0x81
	StatusZdpInvalidEp         Status = 0x82  
	StatusZdpNotActive         Status = 0x83  
	StatusZdpNotSupported      Status = 0x84  
	StatusZdpTimeout           Status = 0x85  
	StatusZdpNoMatch           Status = 0x86  
	StatusZdpNoEntry           Status = 0x88  
	StatusZdpNoDescriptor      Status = 0x89  
	StatusZdpInsufficientSpace Status = 0x8a  
	StatusZdpNotPermitted      Status = 0x8b  
	StatusZdpTableFull         Status = 0x8c  
	StatusZdpNotAuthorized     Status = 0x8d  
	StatusZdpBindingTableFull  Status = 0x8e  
	StatusOtaAbort            Status = 0x95
	StatusOtaImageInvalid     Status = 0x96
	StatusOtaWaitForData      Status = 0x97
	StatusOtaNoImageAvailable Status = 0x98
	StatusOtaRequireMoreImage Status = 0x99
	StatusApsFail              Status = 0xb1
	StatusApsTableFull         Status = 0xb2
	StatusApsIllegalRequest    Status = 0xb3
	StatusApsInvalidBinding    Status = 0xb4
	StatusApsUnsupportedAttrib Status = 0xb5
	StatusApsNotSupported      Status = 0xb6
	StatusApsNoAck             Status = 0xb7
	StatusApsDuplicateEntry    Status = 0xb8
	StatusApsNoBoundDevice     Status = 0xb9
	StatusApsNotAllowed        Status = 0xba
	StatusApsNotAuthenticated  Status = 0xbb
	StatusSecNoKey       Status = 0xa1
	StatusSecOldFrmCount Status = 0xa2
	StatusSecMaxFrmCount Status = 0xa3
	StatusSecCcmFail     Status = 0xa4
	StatusSecFailure     Status = 0xad
	StatusNwkInvalidParam         Status = 0xc1
	StatusNwkInvalidRequest       Status = 0xc2
	StatusNwkNotPermitted         Status = 0xc3
	StatusNwkStartupFailure       Status = 0xc4
	StatusNwkAlreadyPresent       Status = 0xc5
	StatusNwkSyncFailure          Status = 0xc6
	StatusNwkTableFull            Status = 0xc7
	StatusNwkUnknownDevice        Status = 0xc8
	StatusNwkUnsupportedAttribute Status = 0xc9
	StatusNwkNoNetworks           Status = 0xca
	StatusNwkLeaveUnconfirmed     Status = 0xcb
	StatusNwkNoAck                Status = 0xcc  
	StatusNwkNoRoute              Status = 0xcd
	StatusMacBeaconLoss           Status = 0xe0
	StatusMacChannelAccessFailure Status = 0xe1
	StatusMacDenied               Status = 0xe2
	StatusMacDisableTrxFailure    Status = 0xe3
	StatusMacFailedSecurityCheck  Status = 0xe4
	StatusMacFrameTooLong         Status = 0xe5
	StatusMacInvalidGTS           Status = 0xe6
	StatusMacInvalidHandle        Status = 0xe7
	StatusMacInvalidParameter     Status = 0xe8
	StatusMacNoACK                Status = 0xe9
	StatusMacNoBeacon             Status = 0xea
	StatusMacNoData               Status = 0xeb
	StatusMacNoShortAddr          Status = 0xec
	StatusMacOutOfCap             Status = 0xed
	StatusMacPANIDConflict        Status = 0xee
	StatusMacRealignment          Status = 0xef
	StatusMacTransactionExpired   Status = 0xf0
	StatusMacTransactionOverFlow  Status = 0xf1
	StatusMacTxActive             Status = 0xf2
	StatusMacUnAvailableKey       Status = 0xf3
	StatusMacUnsupportedAttribute Status = 0xf4
	StatusMacUnsupported          Status = 0xf5
	StatusMacSrcMatchInvalidIndex Status = 0xff
)