hpievents(1)

πŸ’… hpievents(1) β€” the OpenHPI event-polling bestie

okay so picture this: it's hpievents, a little sample app from the OpenHPI squad, and its whole personality is polling for events. that's it. that's the gig. she sits there, waits for stuff to happen in an opened HPI session, and reports back. iconic behavior honestly πŸŽ€


✨ NAME ✨

hpievents β€” an openhpi sample application that polls for events. yes bestie, that's literally the whole name section, we're keeping it real 🫢


🌸 SYNOPSIS 🌸

get a load of these two forms, they're twins:

 hpievents [ -D <value> ] [-N host[:port]] [-C <cfgfile>] [ -t BLOCK|SAHPI_TIMEOUT_BLOCK|n ] [ -d -X -h ]
 hpievents [--domain=nn] [--host=host[:port]] [--cfgfile=file]
           [--timeout=BLOCK|SAHPI_TIMEOUT_BLOCK|n ] [--discover] [--debug] [--help]

first one's the short-flag girlie, second one's the long-flag girlie. pick your fighter πŸ’…


πŸ’– DESCRIPTION πŸ’–

so hpievents polls for events inside an opened HPI session. that's the main character energy right there ✨

you, the user, get to specify the wait time for the event β€” like how long she's willing to stand there tapping her foot waiting for something to happen. you can also pick the order between hpi resource discovery (resource event) and hpi event subscription. so like, which comes first: the discovering or the subscribing? your call, bestie πŸ¦‹

lowkey important: if no domain or host is selected, hpievents polls for events in the default domain as specified in the openhpiclient.conf file. no cap, that's just how it works πŸ™ˆ

πŸ‘‘ OPTIONS πŸ‘‘

πŸŽ€ Help Options

  • -h, --help β€” show help options. when in doubt, ask for help, it's giving self-care πŸ’…

⭐ Application Options

  • -t n|BLOCK, --timeout=n|BLOCK β€” wait n seconds for the event, or wait forever and ever with infinite wait (BLOCK). infinite. no clock. just vibes ⏳
  • -d, --discover β€” call saHpiDiscover() after saHpiSubscribe(). order matters, bestie, we do the subscribe first and the discover second 🧚
  • -D nn, --domain=nn β€” select domain id nn πŸ‘‘
  • -X, --debug β€” display debug messages. for when you need to know everything πŸ”₯
  • -N "host[:port]", --host="host[:port]" β€” open a session to the domain served by the daemon at the specified URL (host:port). this option overrides the OPENHPI_DAEMON_HOST and OPENHPI_DAEMON_PORT environment variables. and listen β€” if host contains ':' (like, say, an IPv6 address) then enclose it in square brackets. example time: "[::1]" or "[::1]:4743". don't forget the brackets or it's gonna be a whole thing 😭
  • -C "file", --cfgfile="file" β€” use the passed file as the client configuration file. this option overrides the OPENHPICLIENT_CONF environment variable. file supremacy, periodt πŸ“

🌈 HPI APIs uniquely used in this application 🌈

these are the API girlies doing all the actual work, shown exactly as they appear, no edits, no notes:

SaErrorT SAHPI_API saHpiSubscribe (
    SAHPI_IN SaHpiSessionIdT      SessionId );

SaErrorT SAHPI_API saHpiUnsubscribe (
    SAHPI_IN SaHpiSessionIdT  SessionId );

SaErrorT SAHPI_API saHpiEventGet (
    SAHPI_IN SaHpiSessionIdT            SessionId,
    SAHPI_IN SaHpiTimeoutT              Timeout,
    SAHPI_OUT SaHpiEventT               *Event,
    SAHPI_INOUT SaHpiRdrT               *Rdr,
    SAHPI_INOUT SaHpiRptEntryT          *RptEntry,
    SAHPI_INOUT SaHpiEvtQueueStatusT    *EventQueueStatus );

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, they're all in the same friend group fr fr:

  • hpi_shell

and the whole squad:

hpialarms      hpigensimdata  hpireset       hpitop
hpidomain      hpiinv         hpisensor      hpitree
hpiel          hpionIBMblade  hpisettime     hpiwdt
hpifan         hpipower       hpithres       hpixml
ohdomainlist   ohhandler      ohparam

πŸ’œ AUTHORS πŸ’œ

the authors of this man page, aka the ones who wrote it down so we'd all know:

  • Peter D Phan (pdphan@users.sourceforge.net)
  • Ulrich Kleber (ulikleber@users.sourceforge.net)
  • Anton Pak (avpak@users.sourceforge.net)

that's the whole page bestie, you ate it up πŸ’…βœ¨

cute little sign-off just for you: this one's OpenHPI version 4.0.0, dated 2023-01-26. screenshot it, frame it, put it on your wall πŸŽ€πŸ«Ά