Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "ioctl-enum", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "C++ macro oriented framework in single header file for easier export of ioctl numbers to JavaScript and TypeScript. Removes the need of building native C++ Node.js Addons", | ||
@@ -5,0 +5,0 @@ "main": "ioctl-enum.h", |
@@ -34,3 +34,6 @@ # ioctl-enum | ||
``` | ||
## API | ||
### IOCTL_ENUM(name), name \<String\> | ||
Give a name to your enum: | ||
@@ -40,3 +43,7 @@ | ||
IOCTL_ENUM("SomeName"); | ||
``` | ||
### IOCTL_ENUM_IOCTL(ioctl_key, ioctl_value), ioctl_key \<String\>, ioctl_value \<unsigned long\> (_IO, _IOR, _IOW, _IOWR) | ||
Add ioctl numbers to your enum: | ||
@@ -48,2 +55,4 @@ | ||
### IOCTL_ENUM_EXPORT() | ||
Export your enum to language/s you defined with IOCTL_ENUM_[J/T]S: | ||
@@ -66,3 +75,3 @@ | ||
## JavaScript: | ||
Consider the following abient kernel device driver header: | ||
@@ -125,2 +134,4 @@ ```c | ||
## JavaScript: | ||
```c++ | ||
@@ -213,3 +224,3 @@ // export_ioctl_js.cc | ||
// ARA_TESTER.ts | ||
export const enum ARA_TESTER{ | ||
export const enum ARA_TESTER { | ||
ARA_TESTER_PAUSE = 16128, | ||
@@ -256,3 +267,3 @@ ARA_TESTER_RESUME = 16129, | ||
// ARA_TESTER.ts | ||
export enum ARA_TESTER { | ||
export const enum ARA_TESTER { | ||
ARA_TESTER_PAUSE = 16128, | ||
@@ -277,3 +288,3 @@ ARA_TESTER_RESUME = 16129, | ||
// ARA_TESTER.ts | ||
export enum ARA_TESTER { | ||
export const enum ARA_TESTER { | ||
ARA_TESTER_PAUSE = 16128, | ||
@@ -345,3 +356,3 @@ ARA_TESTER_RESUME = 16129, | ||
A: Using IOCTL_ENUM, IOCTL_ENUM_IOCTL and IOCTL_ENUM_EXPORT forms a whole C++ program that has it's own int main function wich generates strings as you use IOCTL_ENUM and IOCTL_ENUM_IOCTL and than writes those strings to files when you call IOCTL_ENUM_EXPORT. | ||
A: Using IOCTL_ENUM, IOCTL_ENUM_IOCTL and IOCTL_ENUM_EXPORT forms a whole C++ program that has it's own int main function wich generates strings as you use IOCTL_ENUM and IOCTL_ENUM_IOCTL and than writes these strings to files when you call IOCTL_ENUM_EXPORT. | ||
@@ -557,12 +568,10 @@ Under the hood: this is how int main function would looked like if ioctl numbers from exaple were exported both to JavaScript and TypeScript: | ||
A: I'm Ivo Stratev and I'm 19 years old who just finished hihg school at Technological school "Electronic Systems" at the Technical University - Sofia with 5.85 of possible 6.00. | ||
A: I'm Ivo Stratev and I'm 19 years old who just finished high school at Technological school "Electronic Systems" at the Technical University - Sofia with 5.85 of possible 6.00. | ||
There I've learn to code. I'm self taught in kernel programming currenlty only under Linux. I'm doing alot of IoT and for the interfaces I used to use Angular.js but now I'm using React and the new version of Angular (known as Angular 2) also using Node.js (express and Hapi) for middle layer in the communication with the device drivers I make. | ||
I haven't always been staticly typed fan I used to do alot of Ruby, Python and CoffeeScript but after my last big project which at the end was more than 10K lines of code I realised that static type do pay of so I recommend every JavaScript programmer to use TypeScript (even if I my self hate Microsoft and what they have done ... mainly for IE, any way there are two good things created by them: AJAX and TypeScript). | ||
I haven't always been staticly typed fan I used to do alot of Ruby, Python and CoffeeScript but after my last big project which was all in Coffee and in the end was more than 10K lines of code I realised that static type do pay of so I recommend every JavaScript programmer to use TypeScript (even that I my self hate Microsoft (less nowadays) and what they have done ... mainly for IE Well there are there good things created by them: AJAX, TypeScript and VSCode). | ||
Besides programming (coding) I'm training every day. | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23209
568