Returns the resource name.
[Example]
resName = olpResource.GetName()
•
|
GetManufacturer(): string
|
|
|
The resource manufacturer
|
Returns the resource manufacturer.
[Example]
resManufacturer = olpResource.GetManufacturer()
Returns the resource series.
[Example]
resSeries = olpResource.GetSeries()
Returns the resource model.
[Example]
resModel = olpResource.GetModel()
|
|
The item type of the resource as unsigned integer
|
Returns the item type of the resource as unsigned integer.
[Example]
itemType = olpResource.GetItemType()
|
|
The item sub type of the resource as unsigned integer
|
Returns the item sub type of the resource as unsigned integer.
[Example]
itemSubType = olpResource.GetItemSubType()
|
|
List of CENPyOlpPort objects. All ports that are currently active in the resource.
|
Returns a list of all ports that are currently active in the resource.
[Example]
allPorts = resource.GetAllPorts()
allPortCount = len(allPorts)
for i in range(0, allPortCount):
port = allPorts[i]
portDirection = port.GetPortDirection()
if (portValueType != VALUETYPE_BOOL):
continue
if (portDirection != RES_INPORTS):
continue
|
|
Specifies the value type of ports to be returned. There is no option for all value types, use GetAllPorts method instead.
|
|
|
Specifies the direction of ports to be returned. There is no option for all directions, use GetAllPorts method instead.
|
|
|
List of CENPyOlpPort objects. All ports that are currently active and have the requested value type and direction in the resource.
|
Returns a list of prefiltered ports. The ports in the list will all be active in the current resource and have the requested value type and direction.
[Example]
outBoolPorts = resource.GetPorts(VALUETYPE_BOOL, RES_OUTPORTS)
outBoolPortCount = len(outBoolPorts)
for i in range(0, outBoolPortCount):
outPort = outBoolPorts[i]
outPortComment = outPort.GetComment()
[Example]
foundAttribute = resource.GetAttributeByName("AttributeName")
•
|
GetValueOfIntegerAttributeByName(name: string): int
|
|
|
Name of attribute to search for
|
|
|
Value of the attribute
|
[Example]
valueOfIntAttrib = resource.GetValueOfIntegerAttributeByName("AttributeName")
•
|
GetValueOfFloatAttributeByName(name: string): float
|
|
|
Name of attribute to search for
|
|
|
Value of the attribute
|
[Example]
valueOfFloatAttrib = resource.GetValueOfFloatAttributeByName("AttributeName")
•
|
GetValueOfStringAttributeByName(name: string): string
|
|
|
Name of attribute to search for
|
|
|
Value of the attribute
|
[Example]
valueOfStringAttrib = resource.GetValueOfStringAttributeByName("AttributeName")
•
|
GetValueOfBoolAttributeByName(name: string): bool
|
|
|
Name of attribute to search for
|
|
|
Value of the attribute
|
[Example]
valueOfBoolAttrib = resource.GetValueOfBoolAttributeByName("AttributeName")
|