Forum Discussion
Raymond_Morris_
Jul 25, 2006Nimbostratus
Need a constructor for C# web page?
I've been working with the code from the video example of the simple iControl app (Nice job, Joe. You are a rock star.) I'm trying to use C to write a .NET web page to show a read-only view. Since thi...
Jul 27, 2006
Things are a bit off. In your first code segment
UInt64 build64(BigIP1.Node.ITCMLocalLBNode value)
{
return ((string)value.get_node_server_list()<<32)|(string)value.low;
}
you are passing in an interface object (value) and are using it 1) to call the get_node_server_list(); and 2) to access a low value.
1) assuming value is an interface to our Node methods, then the get_node_server_list() method returns an array of IPPortDefinitions. IPPortDefinition is a structure that contains an address (string) and a port (long). You are then bit shifting the array of structures and or'ing it to 2).
2) If this is an interface to the Node methods, then I'm not sure why you are trying to extract a structure member of low from it.
If you are pulling this from the forums, I'm assuming you should be using this format
UInt64 build64(Pool.CommonULong64 value)
{
return ((ulong)value.high<<32)|(uint)value.low;
}
Where the input parameter is a CommonULong64 value which is a structure with the high and low values of the 64 bit number.
As for your second line:
Node.ITCMCommonIPPortDefinition [] node_defs = node.get_node_server_list();
I'm not sure why this would cause the same error as above ("Cannot convert type "..." to 'string') as you aren't converting it to a string. This looks correct to me as the correct return type from the get_node_server_list() is an array of ITCMCommonIPPortDefinition structures.
-Joe
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects