StateRow¶
-
class
StateRow(table, row=None)[source]¶ Bases:
objectThe StateRow class is a row of a StateTable.
Generated from model’s revision -1, branch
Methods Summary
calDeviceNameFromBin(row, eis)Set the calDeviceName in row from the EndianInput (eis) instance.
clearWeight()Mark weight, which is an optional field, as non-existent.
compareNoAutoInc(calDeviceName, sig, ref, onSky)Compare each attribute except the autoincrementable one of this StateRow with the corresponding parameters and return True if there is a match and False otherwise.
compareRequiredValue(calDeviceName, sig, …)equalByRequiredValue(otherRow)Return True if all required attributes of the value part are equal to their homologues in otherRow and False otherwise.
fromBin(eis, table, attributesSeq)Given an EndianInput instance by the table (which must be a Pointing instance) and the list of attributes to be found in eis, in order, this constructs a row by pulling off values from that EndianInput in the expected order.
getCalDeviceName()Get calDeviceName.
getOnSky()Get onSky.
getRef()Get ref.
getSig()Get sig.
getStateId()Get stateId.
getTable()Return the table to which this row belongs.
getWeight()Get weight, which is optional.
initFromBinMethods()isAdded()isWeightExists()The attribute weight is optional.
onSkyFromBin(row, eis)Set the onSky in row from the EndianInput (eis) instance.
refFromBin(row, eis)Set the ref in row from the EndianInput (eis) instance.
setCalDeviceName(calDeviceName)Set calDeviceName with the specified CalibrationDevice value.
setFromXML(xmlrow)Fill the values of this row from an XML string that was produced by the toXML() method.
setOnSky(onSky)Set onSky with the specified bool value.
setRef(ref)Set ref with the specified bool value.
setSig(sig)Set sig with the specified bool value.
setStateId(stateId)Set stateId with the specified Tag value.
setWeight(weight)Set weight with the specified float value.
sigFromBin(row, eis)Set the sig in row from the EndianInput (eis) instance.
stateIdFromBin(row, eis)Set the stateId in row from the EndianInput (eis) instance.
toBin(eos)Write this row out to the EndianOutput instance, eos.
toXML()Return this row in the form of an XML string.
weightFromBin(row, eis)Set the optional weight in row from the EndianInput (eis) instance.
Methods Documentation
-
static
calDeviceNameFromBin(row, eis)[source]¶ Set the calDeviceName in row from the EndianInput (eis) instance.
-
compareNoAutoInc(calDeviceName, sig, ref, onSky)[source]¶ Compare each attribute except the autoincrementable one of this StateRow with the corresponding parameters and return True if there is a match and False otherwise.
-
equalByRequiredValue(otherRow)[source]¶ Return True if all required attributes of the value part are equal to their homologues in otherRow and False otherwise.
-
static
fromBin(eis, table, attributesSeq)[source]¶ Given an EndianInput instance by the table (which must be a Pointing instance) and the list of attributes to be found in eis, in order, this constructs a row by pulling off values from that EndianInput in the expected order.
The new row object is returned.
-
getWeight()[source]¶ Get weight, which is optional. return weight as float raises ValueError If weight does not exist.
-
isWeightExists()[source]¶ The attribute weight is optional. Return True if this attribute exists. return True if and only if the weight attribute exists.
-
setCalDeviceName(calDeviceName)[source]¶ Set calDeviceName with the specified CalibrationDevice value. calDeviceName The CalibrationDevice value to which calDeviceName is to be set.
-
setFromXML(xmlrow)[source]¶ Fill the values of this row from an XML string that was produced by the toXML() method. If xmlrow is a minidom.Element with a nodeName of row then it will be used as is. Anything else that is not a string is an error.
-
setOnSky(onSky)[source]¶ Set onSky with the specified bool value. onSky The bool value to which onSky is to be set.
-
setRef(ref)[source]¶ Set ref with the specified bool value. ref The bool value to which ref is to be set.
-
setSig(sig)[source]¶ Set sig with the specified bool value. sig The bool value to which sig is to be set.
-
setStateId(stateId)[source]¶ Set stateId with the specified Tag value. stateId The Tag value to which stateId is to be set. The value of stateId can be anything allowed by the Tag constructor.
Raises a ValueError If an attempt is made to change a part of the key after is has been added to the table.
-
setWeight(weight)[source]¶ Set weight with the specified float value. weight The float value to which weight is to be set.
-
static