question

Dunc avatar image
Dunc asked ToddL answered

Error in Spirent TestCenter Automation Programmer's Reference

I tried to run the Sequencer Example (Advanced) script in the Spirent TestCenter Automation Programmer's Reference document. It gave me error at this code:

stc::perform SequencerInsert \
-CommandHandles "$setDurationCommand $startAllDevicesCommand
$frameSizeLoop"

The error is

ERROR - in perform: invalid sequencerinsertcommand attribute "commandhandles": should be Active, AlarmState, AutoDestroy, CommandList, CommandParent, ElapsedTime, EndTime, ExecuteSynchronous, Handle, InsertAfter, InsertIndex, IsWaitingForILResponse, LocalActive, Name, ProgressCancelled, ProgressCurrentStep, ProgressCurrentStepName, ProgressCurrentValue, ProgressDisplayCounter, ProgressEnable, ProgressIsCancellable, ProgressIsSafeCancel, ProgressMaxValue, ProgressStepsCount, StartTime, State, Status, or Tags
RuntimeError in perform: invalid sequencerinsertcommand attribute "commandhandles": should be Active, AlarmState, AutoDestroy, CommandList, CommandParent, ElapsedTime, EndTime, ExecuteSynchronous, Handle, InsertAfter, InsertIndex, IsWaitingForILResponse, LocalActive, Name, ProgressCancelled, ProgressCurrentStep, ProgressCurrentStepName, ProgressCurrentValue, ProgressDisplayCounter, ProgressEnable, ProgressIsCancellable, ProgressIsSafeCancel, ProgressMaxValue, ProgressStepsCount, StartTime, State, Status, or Tags
  while executing
"stc_int::salPerform $commandName $args "
  (procedure "stc::perform" line 2)
  invoked from within
"stc::perform SequencerInsert \
-CommandHandles "$setDurationCommand $startAllDevicesCommand
$frameSizeLoop""

How can I solve this?

Spirent TestCenter (STC)automationdocumentationspirent testcenter automation
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ToddL avatar image
ToddL answered

You have a typo here. It should be "devicesStartAllCommand", not "startAllDevicesCommand"

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dunc avatar image
Dunc answered Dunc edited

No, it should be "startAllDevicesCommand", because in the original script in the Programmer's reference document the handler for starting the hosts is defined by

set startAllDevicesCommand [stc::create DevicesStartAllCommand \
-under system1 \
-projectHandle $hProject]

I know that in the document the command for starting the iteration is given as

stc::perform SequencerInsert \
-CommandHandles "$setDurationCommand $devicesStartAllCommand
$frameSizeLoop"

However, in that command, "$devicesStartAllCommand" should be "startAllDevicesCommand", because the handler was set to startAllDevicesCommand variable when DevicesStartAllCommand object was created in the example code. I wrote the fixed version of that command.

Anyway, I found the real error that TCL was complaning about. The error message is saying that there is no "commandhandles" attribute for SequencerInsertcommand. The example script is trying to execute the command with an attribute that does not exist. The attribute "commandhandles" should be "CommandList" in the example script in the reference document.


There are also many other errors and typos in that example script published by Spirent. It took me long time to fix all of them. I am surprised to see so many errors in an example code.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ToddL avatar image
ToddL answered

Sorry for the inconvenience caused. If you have a list of corrections, we will gladly update the document. Alternatively, we can provide you with an editable document that you could modify. Please let us know.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.