ADXL Data Structures

MemType

Represents the memory type.

1
2
3
4
enum MemType {
  MEM_DEVICE,
  MEM_HOST
}

TransferOp

Represents the type of the transmission operation.

1
2
3
4
enum TransferOp {
  READ,
  WRITE
}

MemDesc

Represents the memory description.

1
2
3
4
5
struct MemDesc {
  uintptr_t addr;
  size_t len;
  uint8_t reserved[128] = {};
}

TransferOpDesc

Represents the transmission operation description.

1
2
3
4
5
struct TransferOpDesc {
  uintptr_t local_addr;
  uintptr_t remote_addr;
  size_t len;
}

MemHandle

Represents the handle of the registered memory.

1
using MemHandle = void *;

NotifyDesc

Represents the Notify description.

1
2
3
4
struct NotifyDesc {
  AscendString name;
  AscendString notify_msg;
}

FeatureType

Represents the library capability feature type, which is used for query through the GetCapability API. The enumerated values must be explicitly assigned. New capabilities can only be added at the end.

1
2
3
4
enum FeatureType : int32_t {
  AUTO_CONNECT = 0,
  CLIENT_SERVER_COMM = 1,
}

Enumerated Value

Description

AUTO_CONNECT

Auto Connect mode, corresponding to the OPTION_AUTO_CONNECT option of Initialize.

CLIENT_SERVER_COMM

Client/Server communication mode, in which the server listens on the port and the client initiates a link establishment request.

FEATURE_SUPPORTED / FEATURE_NOT_SUPPORTED

Represents the constant value of the output parameter value of the GetCapability API.

1
2
constexpr int32_t FEATURE_SUPPORTED = 1;
constexpr int32_t FEATURE_NOT_SUPPORTED = 0;