Intel HLAPI Events usage C#

Intel HLAPI Events usage C#

imagem de wimboehme

Hello,

I'm trying to develop a program using the Intel HLAPI. So far I got everything working fine, but I can't get my head around the events.
I'd like to be abled to detect the event "CB_BOOT_COMPLETED", but the documentation isn't very clear on how to subscribe to events. Can someone help me on this? I'm working in C#.

Thanks.

9 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de Gael Hofemeier (Intel)

Hi wimboehme,

Have you checked out the sample code in the HLAPI Package in IEvents.cs?

//OS_Boot events

EventsDictionary.Add("Boot_from_Floppy", new eventDetails(new eventDetails.filterValues(255, 31, 0, 88, 1, 255, 38, 0, 90, 111), FilterName.Platform));

EventsDictionary.Add("CD_Boot_Completed", new eventDetails(new eventDetails.filterValues(255, 31, 4, 88, 1, 255, 38, 0, 91, 111), FilterName.Platform));

EventsDictionary.Add("All_OS_Boot_Events", new eventDetails(new eventDetails.filterValues(255, 31, 15, 255, 0, 255, 0, 0, 92, 255), FilterName.Platform));

public static class OS_Boot

{

public static string Boot_from_Floppy = "Boot_from_Floppy";

public static string CD_Boot_Completed = "CD_Boot_Completed";

public static string All_OS_Boot_Events = "All_OS_Boot_Events";

}

Follow me on Twitter: @GHIntelBlogs Facebook: https://www.facebook.com/gh.intelblogs
imagem de wimboehme

I'll check it out, thanks.

imagem de wimboehme

I've found how I can subscribe to an event and how to set up a listener, but I can't work out how to react when the event is thrown. Can you help me on that?

imagem de Gael Hofemeier (Intel)
You need to use the Intel.Manageability Exceptions namespace (see program.cs) Take a look at BootControlFunctionality.cs (catch Manageability Exception ex)

Also look at "HLAPI Lib\Implementation\BootControlImpl.c"- there are samples on how to handle exceptions there. Also look at BootControlFunctionality.cs. These three files look to handle exceptions.

Follow me on Twitter: @GHIntelBlogs Facebook: https://www.facebook.com/gh.intelblogs
imagem de Gael Hofemeier (Intel)

Actually, are you saying that once you capture the event you aren't sure what to do with it? If that's the case, that would depend on what you think should happen in the case of getting an event ranging from simple logging - putting the event into your database, sending an email notification, etc.

Follow me on Twitter: @GHIntelBlogs Facebook: https://www.facebook.com/gh.intelblogs
imagem de wimboehme

I have taken this up again, as it would be better for us if I can get events working. I know how to subscribe to the event using the GeneralSubscription, but after that I don't know how to catch the event. This is my subscribe method: GeneralSubscription sub = new GeneralSubscription(comp.ip, Events.OS_Boot.CD_Boot_Completed, SenderIDType.UUID);
comp.amt.Events.Subscribe(sub); Now I want to know when the event actually occurs. How do I do this?

imagem de Gael Hofemeier (Intel)
Have you enabled the WS-Event Listener? GeneralSubscription.ListenerAddressProperty
The listener's address. Can be IP address or FQDN. WS event reqiuers that theListenerAddresswill be a valid IP address/ FQDN, begin with 'http://' and includes a port. PET event reqiuers only that theListenerAddresswill be a valid IP address/ FQDN.

Have you had a chance do download the latest AMT 8 SDK? It includes the latest version of the HLAPI complete with documentation. The latest SDK is here. It looks like the HLAPI doc has been improved since the last version so you might want to see if it provides any more help. There are samples for setting up the listener instide the HLAPI SK: WSEventingListenerSample -Hopefully this will help.

Follow me on Twitter: @GHIntelBlogs Facebook: https://www.facebook.com/gh.intelblogs
imagem de trlta

Hello

me too looking for same

Faça login para deixar um comentário.