EGD_SENSOR_TYPE(3)

πŸ“¦
version 0.2 Β· 2 versions
  • 0.2 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.2 Β· fedora 43, fedora 44
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– EGD_SENSOR_TYPE πŸ’–

okay bestie, welcome to the EGD_SENSOR_TYPE(3) page from the EEGDEV library manual β€” yes it's a real manual page, yes it's a whole vibe, and yes we're gonna read it together 🫢


✨ NAME ✨

egd_sensor_type, egd_sensor_name β€” grab the id or the name of a sensor type, whichever way you're going πŸŽ€


🌸 SYNOPSIS 🌸

#include <eegdev.h>

int egd_sensor_type(const char* sname);
const char* egd_sensor_name(int stype);

like, that's it. two little functions. iconic. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so egd_sensor_type() hands you back the identifier code of whatever sensor type is called sname. and egd_sensor_name() is literally the reverse glow-up: you give it the sensor type identified by stype, and it retrieves the name for you. it's giving mutuals. πŸ”

now here's the tea, bestie: depending on which acquisition devices the library has actually accessed, the sensor type identifier for a given name may be different from a previous program execution. not a bug, just how it is, no cap. but once an association has been established, it is ensured that it will remain the same until the process termination. periodt. πŸ’―

and additionally β€” this part is the iconique part β€” the sensor types named "eeg", "trigger" and "undefined" are always associated respectively to 0, 1 and 2. those three never switch up on you. main character energy. πŸ‘‘


🌈 RETURN VALUE 🌈

  • when it works out: egd_sensor_type() returns a non negative value, which is the identifier of the sensor type called name. and if it doesn't work out? it returns -1. 😭
  • when it works out: egd_sensor_name() returns the name of the sensor type identified by stype. and if it doesn't work out? NULL is returned, and errno is set accordingly. rude but fair.

πŸ’€ ERRORS πŸ’€

egd_sensor_type() or egd_sensor_name() will fail if:

  • EINVAL β€” sname is NULL or refers to an unknown sensor type, or stype is not a known sensor type identifier. so like, don't pass garbage, bestie, they will clock it immediately πŸ™ˆ

πŸŽ€ SEE ALSO πŸŽ€

go read those next, they're cute too ⭐


and that's the whole page fr fr πŸ’œ this lil slice of the manual is EPFL, 2011 vintage β€” so yes, she's been serving correct answers since 2011 and she's still slaying 🌸✨ bye bestie, go get those sensor types πŸ’–