Error Codes

From PX Documentation

Jump to: navigation, search

Introduction

This page will outline the codes associated with the return types of functions. This can be found at nd/include/ND.h

Function Default Result Error Code
NDSendEventResultIf no error occurs, returns NDSendEventResult::okinvalidType = -7,
connOwnerIDMismatch = -6,
ownerIDNotFound = -5,
ownerIDInvalid = -4,
channelInvalid = -3,
evtInvalid = -2,
timeout = -1,
ok = 0
NDEventDataGetUserEventAlways returns void* (the user event) which may be NULLNone
NDEventDataGetChannelIDResultIf no error occurs, returns the channel IDnullEvent = -1
NDEventDataGetConnIDResultIf no error occurs, returns the connIDnullEvent = -1
NDEventDataGetEventTypeResultIf no error occurs, returns the typeID of the event (which is nonzero)nullEvent = 0
NDEventDataGetTimeResultIf no error occurs, returns the universe time of the eventnullEvent = -1
NDEventDataGetOriginIDResultIf no error occurs, returns the ownerID of the original sender of the eventnullEvent = -1
NDEventDataSetAllIDsValidResultIf no error occurs, returns NDEventDataSetAllIDsValidResult::oknullEvent = -4,
internalError = -3,
validatedIDListFull = -2,
invalidChannelID = -1,
ok = 0
NDEventDataSetAllIDsInvalidResultIf no error occurs, returns NDEventDataSetAllIDsInvalidResult::oknullEvent = -2,
invalidChannelID = -1,
ok = 0
NDEventDataSetIDValidResultIf no error occurs, returns NDEventDataSetAllIDValidResult::oknullEvent = -4,
cannotBeValid = -3,
validatedIDListFull = -2,
invalidChannelID = -1,
ok = 0
NDEventDataSetIDInvalidResultIf no error occurs, returns NDEventDataSetIDInvalidResult::oknullEvent = -2,
invalidChannelID = -1,
ok = 0
NDEventDataGetNextValidIDResultIf no error occurs, returns the next ID in the sequence, or NDEventDataGetNextValidIDResult::noMoreIDs when the sequence has endednullEvent = -5,
noMoreIDs = -4,
internalErrorA = -3,
internalErrorB = -2,
invalidChannelID = -1,
ok = 0
NDEventDataGetNextValidIDResetResultIf no error occurs, returns NDEventDataGetNextValidIDResetResult::oknullEvent = -1,
ok = 0
NDEventDataGetObjectIDResultIf no error occurs, returns the objectID associated with this eventnullData = -1
NDEventDataGetFieldIDResultIf no error occurs, returns the object fieldID associated with this eventnullData = -1
NDEventDataSetFieldDataResultIf no error occurs, returns NDEventDataSetFieldDataResult::oknullData = -7,
nullNewData = -6,
invalidFieldID = -5,
noSuchObjectID = -4,
noSuchObjectType = -3,
fieldNotRegistered = -2,
invalidChannelID = -1,
ok = 0
NDSimDataGetChannelIDResultIf no error occurs, returns the channelID associated with this simDatanullData = -1
NDSimDataGetUniverseTimeResultIf no error occurs, returns the universe time associated with this simDatanullData = -1
NDSimDataGetLastSimTimeResultIf no error occurs, returns the last simulation time associated with this simDatanullData = -1
NDEventDataGetObjectTypeResultIf no error occurs, returns the last object typeID associated with this eventnullData = -1
NDEventDataGetObjectAlways returns void* (the object associated with this event) or NULL in the case of failureNone
NDEventLoopAlways returns voidNone
NDGetEventNameReturns a char* or NULL onlyNone
NDInstallEventTypeResultIf no error occurs, returns the event typeIDalreadyInstalled = -5,
mallocError = -4,
storageError = -3,
invalidType = -2,
invalidChannelID = -1
NDInstallObjectTypeResultIf no error occurs, return the object typeIDinvalidArgument = -4,
mallocError = -3,
storeError = -2,
invalidChannelID = -1
NDCreateObjectResultIf no error occurs, returns NDCreateObjectResult::okinvalidArgument = -3,
serializationFailed = -2,
invalidChannelID = -1,
ok = 0
NDDeleteObjectResultIf no error occurs, returns NDDeleteObjectResult::okinvalidArgument = -2,
invalidChannelID = -1,
ok = 0
NDBeginObjectUpdateResultIf no error occurs, returns NDBeginObjectUpdateResult::okinvalidChannelID = -1,
ok = 0
NDEndObjectUpdateResultIf no error occurs, returns NDEndObjectUpdateResult::okinvalidChannelID = -1,
ok = 0
NDUpdateObjectFieldResultIf no error occurs, returns NDUpdateObjectFieldResult::okinvalidFieldID = -6,
channelHasNoObjectManager = -5,
noSuchObjectID = -4,
noSuchObjectType = -3,
fieldNotRegistered = -2,
invalidChannelID = -1,
ok = 0
NDRegisterFieldResultIf no error occurs, returns NDRegisterFieldResult::okinvalidSize = -8,
noSuchObjectType = -7,
negativeFieldID = -6,
fieldIDTooLarge = -5,
invalidFieldType = -4, invalidOffset = -3,
channelHasNoObjectManager = -2,
invalidChannelID = -1,
ok = 0
NDOGetNumObjectsResultIf no error occurs, returns the number of objects in the specified channelchannelHasNoObjectManager = -2,
invalidChannelID = -1
NDOGetByIDEither returns void* (an object) or NULLNone
NDOGetByTypeEither returns void* (an object) or NULLNone
NDOGetByTypeIDEither returns void* (an object) or NULLNone
NDOGetTypeNameEither returns char* (the type name) or NULLNone
NDConnGetFlagsResultIf no error occurs, returns the flags for the specified connnoSuchConn = -1
NDConnCloseResultIf no error occurs, returns NDConnCloseResult::oknoSuchConn = -1,
ok = 0
NDConnGetLocalOwnerIDResultIf no error occurs, returns the local ownerID of the channel to which the specified conn belongsnoSuchConn = -1
NDConnSetLocalOwnerIDResultIf no error occurs, returns NDConnSetLocalOwnerIDResult::oknoSuchConn = -1,
ok = 0
NDConnGetRemoteOwnerIDResultIf no error occurs, returns the ownerID of the remote party to which this conn is connectednoSuchConn = -1
NDConnGetRemoteAddrReturns a sockaddr_in* containing the remote address this conn is connected to, or NULL on failureNone
NDConnIsStartedReturns 0 if the session has not started, 1 if it has startedNone
NDConnSetTimeoutResultIf no error occurs, returns NDConnSetTimeoutResult::okinvalidTime = -2,
noSuchConn = -1,
ok = 0
NDSetCullingDataResultReturns 0 if no errorinvalidArgument = -2,
invalidChannelID = -1,
ok = 0
NDCreateClientConnResultIf no error occurs, returns the connID for the conn that was createdinvalidIP = -6,
invalidPort = -5,
NDExpired = -4,
connCreationFailed = -3,
connAlreadyClosed = -2,
invalidChannelID = -1
NDCreateServerConnResultIf no error occurs, returns the connID for the conn that was createdNDExpired = -3,
connCreationFailed = -2,
invalidChannelID = -1
NDCloseAllConnsAlways returns voidNone
NDGetNumConnsResultIf no error occurs, returns the number of connections in the specified channelinvalidChannelID = -1
NDGetNumClientsResultIf no error occurs, returns the number of clients on the specified channelinvalidChannelID = -1
NDGetNumServersResultIf no error occurs, returns the number of servers on the specified channelinvalidChannelID = -1
NDGetConnByOwnerIDResultIf no error occurs, returns the connID for the conn with the specified remote ownerIDconnNotFound = -2,
invalidChannelID = -1
NDGetClientConnByOwnerIDResultIf no error occurs, returns the connID for the client conn with the specified remote ownerIDconnNotFound = -2,
invalidChannelID = -1
NDGetServerConnByOwnerIDResultIf no error occurs, returns the connID for the server conn with the specified remote ownerIDconnNotFound = -2,
invalidChannelID = -1
NDGetDefaultChannelAlways returns the default channelIDNone
NDSetDefaultChannelResultIf no error occurs, returns okinvalidChannelID = -1,
ok = 0
NDGetChannelByConnIDResultIf no error occurs, returns the channelID for the channel containing this connIDinvalidConnID = -1
NDCreateChannelResultIf no error occurs, returns the channelIDcreationFailed = -1
NDChannelGetDescriptionAlways returns a char* or NULLNone
NDChannelSetDescriptionAlways returns voidNone
NDChannelGetOwnerIDResultIf no error occurs, returns the local ownerID for the specified channelinvalidChannelID = -1
NDChannelSetOwnerIDAlways returns voidNone
NDChannelSetRoleAlways returns voidNone
NDChannelGetRoleResultIf no error occurs, returns an the role (type NDRole) for this channelinvalidChannelID = -1
NDChannelSetFlagsAlways returns voidNone
NDChannelUnsetFlagsAlways returns voidNone
NDChannelGetFlagsResultIf no error occurs, returns the flags for the specified channelinvalidChannelID = -1
NDChannelExistsResultReturns whether the specified channel existsdoesNotExist = 0, exists = 1
NDChannelGetAddrResultIf no error occurs, returns NDChannelGetAddrResult::okinvalidChannelID = -1,
ok = 0
NDChannelToChannelMessageResultIf no error occurs, returns NDChannelToChannelMessageResult::okinvalidSourceChannelID = -3,
invalidDestChannelID = -2,
nullMessage = -1,
ok = 0
NDStartSessionAlways returns voidNone
NDEndSessionAlways returns voidNone
NDGetUniverseTimeResultIf no error occurs, returns the universe time (in milliseconds) for the specified channelinvalidChannelID = -1
NDInstallSimulationCallbackResultIf no error occurs, returns NDInstallSimulationCallbackResult::okinvalidChannelID = -1,
ok = 0
NDTimeAlways returns the time in seconds since the epoch (1/1/1970)None
NDTimeMSAlways returns the time in milliseconds since ND was initializedNone
NDSleepMSAlways returns voidNone
NDRandomAlways returns a random integer on the interval [0,max)None
NDDefaultDebugCallbackAlways returns voidNone
NDSetDebugCallbackAlways returns voidNone
NDSetDebugLevelAlways returns voidNone
NDGetDebugLevelAlways returns the current debug levelNone
NDSetNetDebugAlways returns voidNone
NDGetNetDebugResultReturns value indicating whether net debug is enabledoff = 0, on = 1