Wiki

The most recent version of this page is a draft.DiffThis version (25 Nov 2022 08:21) was approved by Gireesha Nirvanaiah.The Previously approved version (24 Nov 2022 10:15) is available.Diff

This is an old revision of the document!


APPENDIX J Thrift

Thrift enables automation of creation of schematics and updating schematics. Refer thrift documentation at https://wiki.analog.com/resources/tools-software/sigmastudiov2/usingsigmastudio/scripting?s[]=thrift for generic APIs which can be used with A2B as well as SigmaStudio+. The following section introduces APIs specific to A2B and this in addition to the one’s available at the website mentioned above.

Note :- Documentation for A2B thrift will be uploaded to wiki.analog.com in the future releases. Any further updates to A2B thrift documentation will be provided at this domain.

A UID is a unique identifier string used extensively in thrift to identify the desired entity. It has the format <name>_<zero-based-positive-integer>. For instance “EvalAD2433WB1BZ_0”. To know the UID of any entity, use the GetAllPlugins API (refer the link above) to get a full list of plugins loaded by SS+. Then filter this list for A2B plugins by referring to J.3A2B Shape full names. Now from this list, the string after the last ‘.’ without the _v<version> will be the <name> in the UID string. The integer part of UID must always be incremented for every shape added using a particular <name>.

For instance, one of the items you would get from GetAllPlugins API is “AnalogDevices.Plugins.Platforms.EvalAD2433WA1BZ_v2.0.0.0”. From this the UID <name> will be EvalAD2433WA1BZ. For the first EvalAD2433WA1BZ shape added to the system, it’s UID will be EvalAD2433WA1BZ_0. For the second shape it will be EvalAD2433WA1BZ_1 and so on.

Shape operations

Add Shape

After referring to https://wiki.analog.com/resources/tools-software/sigmastudiov2/usingsigmastudio/scripting/addshape, for A2B the following additional information is applicable.

  1. parentUID
    1. To add a shape to system tab this should be “Diagram_0”
    2. To add a shape inside an A2B platform, this should be the platform uid. For instance, use “EvalAD2428WD1BZ_<zero based positive integer>” to add a shape inside the EvalAD2428WD1BZ platform.
  2. shapeFullName – refer J.3 A2B Shape full names
  3. newPosition – this object has two members X and Y which represent horizontal and vertical coordinates respectively on the canvas.

Remove shape

Add Connection

Refer https://wiki.analog.com/resources/tools-software/sigmastudiov2/usingsigmastudio/scripting/addconnection. In addition, the following information is applicable.

  1. channelFullName – refer Table 7: Plugin full names

Remove connection

A2B Operations

Information about the various user-defined types are available at C:\Analog Devices\ADI_A2B-SSPlus_Software-Rel1.1.0\Schematics\Thrift\a2b.Thrift. This file can be opened with a notepad

Generic Devices

The following describes A2B APIs for update generic device parameters

  1. UpdateProperties(string genericDeviceUID, “PeripheralFile”, “string”, string programmingXMLFilePath) – use this to update the peripheral programming xml
    1. genericDeviceUID – UID of the generic device for which the parameter has to be set.
    2. programmingXMLFilePath – Absolute path to the peripheral programming XML file.
  2. UpdateBooleanProperty(string genericDeviceUID, “ProgramDuringDisc”, bool value) – use this to enable or disable programming of this peripheral device during network discovery.
    1. genericDeviceUID – UID of the generic device for which the parameter has to be set.
    2. value – true to enable programming during discovery and false to disable programming during discovery.

Stream

The following describes A2B APIs for stream operations

  1. AddStream(string channel_uid, ADI_A2B_STREAM streamObject) – use this to add a stream to the stream configuration list
    1. Channel_uid – UID of the A2B channel currently in use.
    2. streamObject – populate this object to the members available within.
  2. UpdateNumericProperty(string channel_uid, “RemoveStream”, int streamid) – use this to delete a stream from the stream configuration list at the zero-based-positive-integer-index streamid
    1. Channel_uid – UID of the A2B channel currently in use.
    2. streamid – zero based positive integer index of the stream object in the stream list
  3. UpdateNumericProperty(string channel_uid, “MoveUp”, int streamid) – use this to move the stream at streamid up by one.
    1. Channel_uid – UID of the A2B channel currently in use.
    2. streamid – zero based positive integer index of the stream object in the stream list
  4. UpdateNumericProperty(string channel_uid, “MoveDown”, int streamid) – use this to move the stream at streamid down by one
    1. Channel_uid – UID of the A2B channel currently in use.
    2. streamid – zero based positive integer index of the stream object in the stream list
  5. UpdateStream(string channel_uid, “EditStream”, int streamid) – use this to edit stream objects that are updated to the stream list at position streamid
    1. Channel_uid – UID of the A2B channel currently in use.
    2. streamid – zero based positive integer index of the stream object in the stream list
  6. UpdateStream(string channel_uid, “StreamDestChanged”, int streamid) – use this to the destID member of stream object in stream list at position streamid
    1. Channel_uid – UID of the A2B channel currently in use.
    2. streamid – zero based positive integer index of the stream object in the stream list
  7. UpdateStream(string channel_uid, “StreamSourceChanged”, int streamid) – use this to the StreamSourceNodeID member of stream object in stream list at position streamid
    1. Channel_uid – UID of the A2B channel currently in use.
    2. streamid – zero based positive integer index of the stream object in the stream list
  8. UpdateBooleanProperty(string channel_uid, “AutoCalculateChk”, bool value) – use this to enable or disable the auto calculation of slot configuration for the current stream list
    1. Channel_uid – UID of the A2B channel currently in use.
    2. Value – true to enable auto calculation and false to disable auto calculation
  9. UpdateNumericProperty(string channel_uid, “AutoCalculate”, int streamid) – use this to perform auto calculation of slot configuration for the A2B network based on the stream list.
    1. Channel_uid – UID of the A2B channel currently in use.
    2. streamid – zero based positive integer index of the stream object in the stream list
  10. UpdateBooleanProperty(string channel_uid, “Download”, true) – use this send the current slot configuration register values to the A2B network
    1. Channel_uid – UID of the A2B channel currently in use.
  11. GetStreamInfo (string channel_uid) – use this fetch the current stream information object list
    1. Channel_uid – UID of the A2B channel currently in use.

Bandwidth

The following sections describes APIs for bandwidth operations.

  1. BwParams GetBWParams(string channel_uid)– use this to fetch the bandwidth configuration parameters object.
    1. Channel_uid – UID of the A2B channel currently in use.
    2. BwParams – An object that has all the bandwidth configuration parameters.
  2. UpdateBWCalcNwParams(string channel_uid, BwParams bwParamsObject) – use this set the bandwidth configuration parameters object .
    1. Channel_uid – UID of the A2B channel currently in use.
    2. bwParamsObject – An object that has all the bandwidth configuration parameters.
  3. UpdateBooleanProperty(string channel_uid, “ BwCalcRun ”, true) – use this to calculate bandwidth for the current network
    1. Channel_uid – UID of the A2B channel currently in use.
  4. BwCalc ReadBWRes(string channel_uid) – use this to fetch the calculated bandwidth results.
    1. Channel_uid – UID of the A2B channel currently in use.
    2. BwCalc – An object that has the results of bandwidth calculatio

Register Read / Write

The following section describes register read and write operationsThe following section describes register read and write operations

  1. SetRegValue(string TrxID, RegAddrValPair regAddrValPair) – use this to write the register at the address with a value, both of which are specified by regAddrValPair object, in the transceiver with UID TrxID
    1. TrxID – UID of the transceiver of interest
    2. regAddrValPair – An object which has a member for register address and another member for value.
  2. List <RegAddrValPair> ReadRegValue(string TrxID, List<int> registerAddressList) – use this to read the values from all the registers whose addresses are given in registerAddressList.
    1. TrxID – UID of the transceiver of interest
    2. regAddrValPair – An object which has a member for register address and another member for value.
    3. registerAddressList – A list of register addresses from which the values need to be read.

A2B Shape full names

This section describes the A2B full names to be used for “shapeFullName” argument of thrift APIs.

Use the API GetAllPlugins to get a list of all the plugins loaded into the application and use the formats given below to filter out A2B plugins. (available at https://wiki.analog.com/resources/tools-software/sigmastudiov2/usingsigmastudio/scripting/getallplugins)

/srv/wiki.analog.com/data/pages/resources/tools-software/a2bv2/quickstartguide/appendix-j.txt · Last modified: 08 Dec 2022 12:45 by Gireesha Nirvanaiah