Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.TelecommandManagement
Class TransactionTelecommand

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.TelecommandManagement.Telecommand
              |
              +--RtjAocsFramework.TelecommandManagement.TransactionTelecommand
Direct Known Subclasses:
ModeChangeTransactionTelecommand, ReconfigureTransactionTelecommand, TelemetryFormatTransactionTelecommand

public class TransactionTelecommand
extends Telecommand

A transaction telecommand is a telecommand that is intended to be part of a sequence of telecommands that can be treated as a transaction. This means that in case of failure of a telecommand in the sequence, telecommands that have already been executed can be unexecuted and the system can be returned to the state in which it was at the time the transaction began. Transaction telecommand are therefore endowed with an unExecute method that undoes the effects of their actions.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The Telecommand Framelet Document.

Constructor Summary
TransactionTelecommand(int timeTag)
          Create a telecommand with the given time tag.
 
Method Summary
 boolean canExecute()
          Recursively calls canExecute on all telecommands in the transaction and returns true if all canExecute return true.
 short execute()
          Recursively execute all the telecommands in the telecommand transaction.
 TransactionTelecommand getNextTransactionTelecommand()
           
 TransactionTelecommand getPreviousTransactionTelecommand()
           
 TelecommandManager getTelecommandManager()
           
 boolean isEnabled()
          Recursively calls isEnabled on all telecommands in the transaction and returns true if all calls to isEnabled return true.
 void setNextTransactionTelecommand(TransactionTelecommand t)
          Set t as the next telecommand in the transaction and update the link to the previous telecommand in t.
 void setPreviousTransactionTelecommand(TransactionTelecommand t)
          Set t as the previous telecommand in the transaction and update the link to the next telecommand in t.
 void setTelecommandManager(TelecommandManager m)
           
 short unExecute()
          Recursively undo the effects of all the telecommands so far executed as part of the same transaction.
 
Methods inherited from class RtjAocsFramework.TelecommandManagement.Telecommand
getTelecommandId, getTelecommandTypeId, getTimeTag, setEnable
 
Methods inherited from class RtjAocsFramework.BasicObjects.RootObject
getClassId, getInstanceId, setClassId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionTelecommand

public TransactionTelecommand(int timeTag)
Create a telecommand with the given time tag. Telecommands are enabled by default. Note that there is no default constructor because, unlike most other framework components, telecommands are not Java beans.

Method Detail

execute

public short execute()
Recursively execute all the telecommands in the telecommand transaction.

Overrides:
execute in class Telecommand
See Also:
Telecommand.execute()

unExecute

public short unExecute()
Recursively undo the effects of all the telecommands so far executed as part of the same transaction.


canExecute

public boolean canExecute()
Recursively calls canExecute on all telecommands in the transaction and returns true if all canExecute return true.

Overrides:
canExecute in class Telecommand
See Also:
Telecommand.canExecute()

isEnabled

public boolean isEnabled()
Recursively calls isEnabled on all telecommands in the transaction and returns true if all calls to isEnabled return true.

Overrides:
isEnabled in class Telecommand

getNextTransactionTelecommand

public TransactionTelecommand getNextTransactionTelecommand()

setNextTransactionTelecommand

public void setNextTransactionTelecommand(TransactionTelecommand t)
Set t as the next telecommand in the transaction and update the link to the previous telecommand in t.


getPreviousTransactionTelecommand

public TransactionTelecommand getPreviousTransactionTelecommand()

setPreviousTransactionTelecommand

public void setPreviousTransactionTelecommand(TransactionTelecommand t)
Set t as the previous telecommand in the transaction and update the link to the next telecommand in t.


getTelecommandManager

public TelecommandManager getTelecommandManager()

setTelecommandManager

public void setTelecommandManager(TelecommandManager m)

Real-Time Java AOCS Framework v1.0 API Specification

Real-Time Java AOCS Framework project home page

Automatic Control Laboratory, ETH Zuerich
Physikstrasse 3
CH-8092 Zuerich, Switzerland