Wiki

This version (06 Oct 2023 09:20) was approved by Gireesha Nirvanaiah.The Previously approved version (25 Nov 2022 08:21) is available.Diff

Click here to return to the QSG homepage

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.3 A2B 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)

Table 7: Plugin full names

Shape Shape/Channel full name
All platforms that have the name format
“Eval<transceiver part number and PCB number>”.
Example :-
EvalAD2433WA1BZ
“AnalogDevices.Plugins.Platforms.Eval<transceiver part number and PCB number>_v<plugin version in a.b.c.d format>”.

Example:-
“AnalogDevices.Plugins.Platforms.EvalAD2433WA1BZ_v2.0.0.0”
All A2B transceivers “AnalogDevices.Plugins.Transceivers.<transceiver name>_v<version in a.b.c.d format>”
Example:-
AnalogDevices.Plugins.Transceivers.AD243xMain_v2.0.0.0
All A2B generic devices “AnalogDevices.Plugins. Peripherls.<peripheral type name>_v<version in a.b.c.d format>”
Example:-
“AnalogDevices.Plugins.Peripherls.A2B.GenericDevices_v1.0.0.0”
A2B links/Channels “AnalogDevices.Plugins.Channels.A2BChannel_v2.0.0.0”
I2C, SPI, USB Links/Channels “AnalogDevices.Plugins.CommunicationChannels.USBChannel_v1.0.0.0”
resources/tools-software/a2bv2/quickstartguide/appendix-j.txt · Last modified: 08 Dec 2022 12:45 by Gireesha Nirvanaiah