Acroname Inc.

Acroname Reference (v2.11)

  • Devices
  • Software
  • API Reference
    • BrainStem Entities
    • Python API Reference
    • C++ API Reference
    • C API Reference
    • RESTful API Reference
    • .NET API Reference
    • CCA API Reference
      • Analog Entity
      • App Entity
      • Clock Entity
      • Digital Entity
      • Equalizer Entity
      • I2C Entity
      • Mux Entity
      • Pointer Entity
      • Port Entity
      • PowerDelivery Entity
      • Rail Entity
      • RCServo Entity
      • Relay Entity
      • Signal Entity
      • Store Entity
      • System Entity
      • Temperature Entity
      • Timer Entity
      • UART Entity
      • USB Entity
      • USBSystem Entity
      • Module Entity
      • Link Entity
      • PDChannelLogger
      • PortMapping
      • Version
    • LabVIEW API Reference
    • Reflex Language Reference
    • Q-Sys API Reference
  • BrainStem
Acroname Reference (v2.11)
  • Docs »
  • API Reference »
  • CCA API Reference »
  • Link Entity

Link Entity¶

group LinkEntity

The Link class provides link level access to streaming information.

struct linkSpec_CCA¶

CCA linkSpec structure - It contains the necessary information for connecting to a BrainStem module.

Public Members

unsigned int type¶

The transport type of this spec.

unsigned int serial_num¶

The serial number of the module

unsigned int module¶

The module address

unsigned int router¶

The BrainStem network router address

unsigned int router_serial_num¶

The BrainStem network router serial number

unsigned int model¶

The model type

unsigned int usb_id¶

The usb_id of the BrainStem module.

unsigned int ip_address¶

The IP4 address of the module.

unsigned int ip_port¶

The TCP port for socket connection on the module.

unsigned int baudrate¶

The serial port baudrate

char port[100]¶

The serial port path or name

struct StreamStatusEntry_CCA¶

StreamStatusEntry structure - It contains members of streaming entries in the form of key value pairs. Keys are comprised of the devices module address, command, option, index, and subindex API values.

Public Members

unsigned long long key¶

The stream key (64bit).

unsigned int value¶

The value associated with the key (32bit).

void link_enableStream(unsigned int *id, struct Result *result, const unsigned char moduleAddress, const unsigned char cmd, const unsigned char option, const unsigned char index, const bool enable)¶

Enables streaming for the supplied criteria.

Parameters:
  • id – Unique identifier for the internally created stem.

  • result – object, containing NO_ERROR or a non zero Error code.

  • moduleAddress – Address to filter on.

  • cmd – cmd to filter by (supports Wildcards)

  • option – option to filter by (supports Wildcards)

  • index – index to filter by (supports Wildcards)

  • enable – True - Enables streaming; False - disables streaming

void link_getLinkSpecifier(unsigned int *id, struct Result *result, struct linkSpec_CCA *spec)¶

Get linkSpecifier

Parameters:
  • id – Unique identifier for the internally created stem.

  • result – object, containing NO_ERROR or a non zero Error code.

  • spec – - allocated linkspec struct will be filled with spec.

void link_registerStreamCallback(unsigned int *id, struct Result *result, const unsigned char moduleAddress, const unsigned char cmd, const unsigned char option, const unsigned char index, const bool enable, cStreamCallback_t cb, void *pRef)¶

Registers a callback function based on a specific module, cmd, option, and index.

::aErrNotFound - Item not found (uninstalling only)

::aErrNone - success

Parameters:
  • id – Unique identifier for the internally created stem.

  • result – object, containing NO_ERROR or a non zero Error code.

  • cmd – cmd to filter by (supports Wildcards)

  • option – option to filter by (supports Wildcards)

  • index – index to filter by (supports Wildcards)

  • enable – True - installs/updates callback and ref; False - uninstalls callback

  • cb – Callback to be executed when a new packet matching the criteria is received.

  • pRef – Pointer to user reference for use inside the callback function.

void link_getStreamStatus(unsigned int *id, struct Result *result, const unsigned char moduleAddress, const unsigned char cmd, const unsigned char option, const unsigned char index, const unsigned char subindex, struct StreamStatusEntry_CCA *buffer, const unsigned int bufferLength)¶

Gets all available stream values based on the search criteria.

::aErrParam if status or unloadedSize is null

::aErrNone - success

Parameters:
  • id – Unique identifier for the internally created stem.

  • result – object, containing NO_ERROR or a non zero Error code.

  • moduleAddress – Address to filter on (supports Wildcards)

  • cmd – cmd to filter by (supports Wildcards)

  • option – option to filter by (supports Wildcards)

  • index – index to filter by (supports Wildcards)

  • subindex – subindex to filter by (supports Wildcards)

  • buffer – Buffer of user allocated memory to be filled with stream data Note: Link::getStreamKeyElement should be used to decode the keys

  • bufferLength – Number of elements the buffer can hold.

void link_getStreamKeyElement(struct Result *result, const unsigned long long key, const unsigned char element)¶

Convenience function to unpack a stream key.

Parameters:
  • key – The key to be unpacked

  • element – The element to unpack from the key.

Previous Next

© Copyright 1994-2025, Acroname Inc. All rights reserved. BrainStem is a registered trademark of Acroname. All other marks are property of their respective owners.. Last updated on Mar 05, 2025.