Intel® Business Client Software Development
Support for Intel® vPro™ software development and technologies associated with Intel vPro platforms.

Java vs VB

sabreke
Beginner
462 Views
Hi,

At my work, we're looking into the possibility of using the intel amt features on our desktops/notebooks. We're trying out differents software suites that support these features but at this point nothing seems to do what we want.

That's when I came up with the idea of creating some basic applications that can manage our desktops. I like to be able to have just the features we need and nothing more. If we need more, we can add this ourself.

My question is what's the best language to make these tools? What programming language will give me the most options and possibilities? It doesn't matter wether it's Java or VB, because I know how to code in both languages.

I'm thinking about power options, kvm options, ...


Could you please convince me about what language to choose?

thx
0 Kudos
6 Replies
Gael_H_Intel
Moderator
462 Views
Hello there!

Well, first I think you should take a look at the SDK documentation that we have available on line: HERE(if you haven't already.) The SDK(Software Development Kit), is available for Download HERE. You will find sample code for all the AMT Featuresin C++ and C#. However, since you are interested in Java, I would also take a look at the Java Reference Library that is available on our Community Site: HERE.

We don't have any reference code for you to look at that is written in VB so I would recommend going with Java.

Let us know if you need any more information,

Gael

0 Kudos
sabreke
Beginner
462 Views
First of all, thank you for the quick reply.

C# won't be a problem too. So which one to choose: C# or Java? I don't want to start programming in one language and then find out after a few weeks that some functions won't be available but are in the other language.

Keep in mind that I will also be using LDAP and SQL.
0 Kudos
jacace
New Contributor I
462 Views
Hi sabreke,

Anyway, you can use the c# assemblies from yourVB code.

0 Kudos
Gael_H_Intel
Moderator
462 Views
Hi sabreke,

I think it pretty much depends on what language you aremost comfortable with. Also, if you need a lot of code samples - you can base your decision on what samples are available for you to use. The DTK (Developer's Toolkit) has source available - it is written in C#.
0 Kudos
sabreke
Beginner
462 Views
Thank you for the information. I've decided to go for C#.

I hope I can create some great tools. I hope the great support will continue.
0 Kudos
Andrew_S_Intel2
Employee
462 Views

The important thing to call out in addition to what Gael and Javier said is that other than acting as an example, the language you use isn't all that important. AMT responds to WS-Man messages, as long as they are properly formatted.

To use power control as an example, the function used to power on the system is the RequestPowerStateChange function in the CIM_PowerManagementService class. This function requires 2 arguments, the reference to the CIM_ComputerSystem it's operating on (more on this later), and the power state you want this system to move to (this is an integer value).

The Power state is pretty straightforward, but the reference to CIM_ComputerSystem needs a bit more explanation. The reference to CIM_ComputerSystem gives which instance of CIM_ComputerSystem the power operation is working on. AMT has two instances, the one representing the computer is the one with Name="ManagedSystem".

So the most basic way you can call a power operation is:
1. Get the reference to CIM_PowerManagentService
2. Define the reference to the instance ofCIM_ComputerSystem
3. Create the power operation request
4. Invoke and parse the response.

Inthe RemoteControl java example (which is in the content here:), that looks like this:
1. Get the instance of CIM_PowerManagmentService

[bash]powerMS_ref = connection.newReference("CIM_PowerManagementService");
[/bash]


2.Define the reference to CIM_ComputerSystem (refer to the instance with Name=ManagedSystem)

[bash]computerSystem_ref = connection.newReference("CIM_ComputerSystem"); 
computerSystem_ref.addSelector("Name", "ManagedSystem"); computerSystem_ref.addSelector("CreationClassName", "CIM_ComputerSystem");[/bash]



3. Create the RequestPowerStateChange request

[bash]requestPSC_IN = powerMS_ref.createMethodInput("RequestPowerStateChange");
requestPSC_IN.setProperty("PowerState", Integer.toString(PowerState));
requestPSC_IN.setProperty("ManagedElement", computerSystem_ref)[/bash]


4. Invoke the request and parse the response

[java]requestPSC_OUT = (ManagedInstance)(powerMS_ref.invoke(requestPSC_IN));
return Integer.parseInt(requestPSC_OUT.getProperty("ReturnValue").toString());

[/java]



Unless there is a lot of abstraction in the example you're looking at, you'll seea very similar mapping to the underlying WS-Man infrastructure in those examples as well. For example, you'll see something similar in both the SDK examples and the DTK. Strictly speaking,it would be possible to build theWs-Man request out of raw strings, although I really don't recommend it, it'd be like coding in assembly.

The main reason I'm bringing up this point is for tworeasons. First, to point out the similarity to the well-documented flows in the SDK (look in the Features section). And second,that often the best way to debug is to look at the actual request that is getting sent to the AMT system over the wire with a traffic analyzer, and knowing the underlying structure is helpful for that.

[bash][/bash]
0 Kudos
Reply