brlapi_protocol.h(3)

πŸ“¦
version 6.9.1 Β· 6 versions
, in centos-stream 10, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

πŸ’– brlapi_protocol.h β€” types and constants for BrlAPI's protocol πŸ’–

okay bestie, welcome to brlapi_protocol.h, the third page of the Library Functions Manual πŸŽ€ this is the header file where BrlAPI keeps all the little types and constants that make its protocol go brrr. it's giving backstage-pass energy, no cap πŸ’…


✨ SYNOPSIS ✨

#include 'brlapi.h'
#include <inttypes.h>
#include <unistd.h>
#include <pthread.h>

🌸 Data Structures

  • struct brlapi_header_t
  • struct brlapi_versionPacket_t
  • struct brlapi_authClientPacket_t
  • struct brlapi_authServerPacket_t
  • struct brlapi_errorPacket_t
  • struct brlapi_getDriverSpecificModePacket_t
  • struct brlapi_writeArgumentsPacket_t
  • struct brlapi_paramValuePacket_t
  • struct brlapi_paramRequestPacket_t
  • union brlapi_packet_t

πŸ¦‹ Macros

literally the whole alphabet of packet vibes, here we go:

  • #define UINT32_MAX (4294967295U)
  • #define BRLAPI_PROTOCOL_VERSION ((uint32_t) 8) β€” the communication protocol version, bestie, remember it πŸ’œ
  • #define BRLAPI_MAXPACKETSIZE 4096
  • #define BRLAPI_PACKET_VERSION 'v'
  • #define BRLAPI_PACKET_AUTH 'a'
  • #define BRLAPI_PACKET_GETDRIVERNAME 'n'
  • #define BRLAPI_PACKET_GETMODELID 'd'
  • #define BRLAPI_PACKET_GETDISPLAYSIZE 's'
  • #define BRLAPI_PACKET_ENTERTTYMODE 't'
  • #define BRLAPI_PACKET_SETFOCUS 'F'
  • #define BRLAPI_PACKET_LEAVETTYMODE 'L'
  • #define BRLAPI_PACKET_KEY 'k'
  • #define BRLAPI_PACKET_IGNOREKEYRANGES 'm'
  • #define BRLAPI_PACKET_ACCEPTKEYRANGES 'u'
  • #define BRLAPI_PACKET_WRITE 'w'
  • #define BRLAPI_PACKET_ENTERRAWMODE '*'
  • #define BRLAPI_PACKET_LEAVERAWMODE '#'
  • #define BRLAPI_PACKET_PACKET 'p'
  • #define BRLAPI_PACKET_ACK 'A'
  • #define BRLAPI_PACKET_ERROR 'e'
  • #define BRLAPI_PACKET_EXCEPTION 'E'
  • #define BRLAPI_PACKET_SUSPENDDRIVER 'S'
  • #define BRLAPI_PACKET_RESUMEDRIVER 'R'
  • #define BRLAPI_PACKET_SYNCHRONIZE 'Z'
  • #define BRLAPI_PACKET_PARAM_VALUE (('P'<<8) + 'V')
  • #define BRLAPI_PACKET_PARAM_REQUEST (('P'<<8) + 'R')
  • #define BRLAPI_PACKET_PARAM_UPDATE (('P'<<8) + 'U')
  • #define BRLAPI_DEVICE_MAGIC (0xdeadbeefL)
  • #define BRLAPI_HEADERSIZE sizeof(brlapi_header_t)
  • #define BRLAPI_AUTH_NONE 'N'
  • #define BRLAPI_AUTH_KEY 'K'
  • #define BRLAPI_AUTH_CRED 'C'
  • #define BRLAPI_WF_DISPLAYNUMBER 0X01
  • #define BRLAPI_WF_REGION 0X02
  • #define BRLAPI_WF_TEXT 0X04
  • #define BRLAPI_WF_ATTR_AND 0X08
  • #define BRLAPI_WF_ATTR_OR 0X10
  • #define BRLAPI_WF_CURSOR 0X20
  • #define BRLAPI_WF_CHARSET 0X40
  • #define BRLAPI_PVF_GLOBAL 0X01 β€” value is the global value ✨
  • #define BRLAPI_MAXPARAMSIZE (BRLAPI_MAXPACKETSIZE - (sizeof(uint32_t) + sizeof(brlapi_param_t) + 2*sizeof(uint32_t)))
  • #define BRLAPI_PARAMF_GET 0X100 β€” get current parameter value 🫢
  • #define BRLAPI_PARAMF_SUBSCRIBE 0X200 β€” subscribe to parameter updates 🫢
  • #define BRLAPI_PARAMF_UNSUBSCRIBE 0X400 β€” unsubscribe from parameter updates 🫢

πŸ”₯ Functions

the whole friend group, exact signatures, don't @ me:

  • ssize_t brlapi_writePacket (brlapi_fileDescriptor fd, brlapi_packetType_t type, const void *buf, size_t size)
  • ssize_t brlapi_readPacketHeader (brlapi_fileDescriptor fd, brlapi_packetType_t *packetType)
  • ssize_t brlapi_readPacketContent (brlapi_fileDescriptor fd, size_t packetSize, void *buf, size_t bufSize)
  • ssize_t brlapi_readPacket (brlapi_fileDescriptor fd, brlapi_packetType_t *type, void *buf, size_t size)

πŸ‘‘ Variables

  • pthread_mutex_t brlapi_fd_mutex

🧚 Macro Definition Documentation 🧚

πŸ’œ #define UINT32_MAX (4294967295U)

that's it. that's the one macro that gets its own little spotlight section. iconic behaviour honestly ⭐


🌈 Author 🌈

Generated automatically by Doxygen for BrlAPI from the source code. not me getting emotional over an autogenerated credit 😭


ngl bestie, this whole page is auto-generated, so if something looks weird it's the Doxygen talking, not me πŸ’€

okay that's the whole page, mwah πŸ’… this was BrlAPI Version 0.8 of brlapi_protocol.h(3), go forth and packet, periodt πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from