15#define SNF_opcode_mmbr_t uint8_t
17#define SNF_opcode_mmbr_MAX UINT8_MAX
93 const char *Definition);
106 const char *Definition);
120 const char *Definition);
137 const char *Definition);
219#pragma region[Base Opcode Values]
222#define SNF_OPCODE_BASE_CAT (SNF_opcode_mmbr_t)0x00
225#define SNF_OPCODE_BASE_SUBCAT (SNF_opcode_mmbr_t)0x00
228#define SNF_OPCODE_BASE_DET_UNDETAILED (SNF_opcode_mmbr_t)0x00
232#define SNF_OPCODE_BASE_CMD_CONNECT (SNF_opcode_mmbr_t)0x00
235#define SNF_OPCODE_BASE_CMD_RECONNECT (SNF_opcode_mmbr_t)0x01
238#define SNF_OPCODE_BASE_CMD_DISCONNECT (SNF_opcode_mmbr_t)0x02
241#define SNF_OPCODE_BASE_CMD_SNF_VER (SNF_opcode_mmbr_t)0x03
244#define SNF_OPCODE_BASE_CMD_KICK (SNF_opcode_mmbr_t)0x04
247#define SNF_OPCODE_BASE_CMD_CONFIRM (SNF_opcode_mmbr_t)0x05
250#define SNF_OPCODE_BASE_CMD_REJECT (SNF_opcode_mmbr_t)0x06
252#pragma region[Base Command: Invalid]
255#define SNF_OPCODE_BASE_CMD_INVALID (SNF_opcode_mmbr_t)0xFF
257#define SNF_OPCODE_BASE_DET_INVALID_UNREGISTRED_OPCODE (SNF_opcode_mmbr_t)0x01
259#define SNF_OPCODE_BASE_DET_INVALID_ERROR_PROTOCOL (SNF_opcode_mmbr_t)0x02
263#pragma region[Base Opcode Function]
This file includes necessary Checks and includes the the nesessary libraries of the library.
SNF_opcode_LL_item * snf_opcode_get_base_detail(SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
Fetches a base opcode Command from the opcode's data structure.
SNF_opcode * snf_opcode_getu(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command)
Fetches a fully structured OPcode using the default Detail.
SNF_opcode * snf_opcode_getu_base(SNF_opcode_mmbr_t Command)
Fetches a fully structured OPcode witha base "Command" using the default Detail.
int snf_opcode_define_category(SNF_opcode_mmbr_t Code, const char *Definition)
Defines an opcode Category.
SNF_opcode_LL_item * snf_opcode_get_command(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command)
Fetches the opcode Command from the opcode's data structure.
SNF_opcode_LL_item * snf_opcode_get_category(SNF_opcode_mmbr_t Category)
Fetches the opcode Category from the opcode's data structure.
#define SNF_opcode_mmbr_t
Defines SNF_opcode_mmbr_t 's size.
Definition opcode.h:15
int snf_opcode_define_detail(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Code, const char *Definition)
Defines an opcode Detail.
int SNF_opcode_base_isinit
used to check if SNF's base opcodes are initialized
SNF_opcode_LL_item * snf_opcode_get_sub_category(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory)
Fetches the opcode Sub-Category from the opcode's data structure.
SNF_opcode_LL_item * snf_opcode_get_base_sub_category()
Fetches the base opcode Sub-Category from the opcode's data structure.
SNF_opcode * snf_opcode_get_base(SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
Fetches a fully structured OPcode with a base "Command".
SNF_opcode_LL_item * SNF_opcode_LL
Data structure where opcodes will be saved.
int snf_opcode_define_sub_category(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t Code, const char *Definition)
Defines an opcode Sub-Category.
SNF_opcode_LL_item * snf_opcode_get_base_category()
Fetches the base opcode Category from the opcode's data structure.
int snf_opcode_init()
Initializes the SNF's opcodes.
SNF_opcode_LL_item * snf_opcode_get_detail(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
SNF_opcode_LL_item * snf_opcode_get_base_command(SNF_opcode_mmbr_t Command)
Fetches a base opcode Command from the opcode's data structure.
int snf_opcode_compare(SNF_opcode *op1, SNF_opcode *op2)
Compares between two opcodes.
SNF_opcode * snf_opcode_get(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
Fetches a fully structured OPcode.
int snf_opcode_define_command(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Code, const char *Definition)
Defines an opcode Command.
Structure used to save registred opcode members.
Definition opcode.h:60
SNF_opcode_LL_item * parent
Parent ( or higher in Rank ) opcode Member.
Definition opcode.h:69
char * Definition
opcode Member's definition
Definition opcode.h:64
SNF_opcode_LL_item * next
the next opcode member of the same Rank (and of same Parent if they have one).
Definition opcode.h:66
SNF_opcode_LL_item * sub
Child ( or lower in Rank ) opcode Member.
Definition opcode.h:72
SNF_opcode_mmbr_t OPmmbr
opcode Member value
Definition opcode.h:62
SNF_opcode's Structure if you wanna access it using a structure.
Definition opcode.h:32
SNF_opcode_mmbr_t SubCategory
opcode's Sub-Category
Definition opcode.h:36
SNF_opcode_mmbr_t Category
opcode's Category
Definition opcode.h:34
SNF_opcode_mmbr_t Detail
opcode's Detail
Definition opcode.h:40
SNF_opcode_mmbr_t Command
opcode's Command
Definition opcode.h:38
Structure for the opcode.
Definition opcode.h:29
SNF_opcode_mmbr_t opcode[4]
SNF_opcode's Structure if you wanna access using a table.
Definition opcode.h:48
struct SNF_opcode_t::SNF_opcode_struct strct