-
Notifications
You must be signed in to change notification settings - Fork 0
Appcelerator Titanium SNMP Module
License
NetFunctional/nf_snmp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Appcelerator Titanium SNMP Module ================================= Based off the net-snmp example code, this implements the common SNMP functions needed to talk to various SNMP enabled network devices. This is a Titanium module, so you will need to have a working Appcelerator Titanium setup in order to compile this, along with Xcode. Compiling Notes --------------- Ensure you set the valid architectures on both the project and netfunctional_snmp target to armv6 and armv7. Failure to do so will still build okay, but when you package your application for the app store, it'll complain because the armv6 portion of the library (libnetfunctionalsnmp.a) is missing, and only contains the armv7 and i386 portions. BUILD TIME COMPILER CONFIG -------------------------- You can edit the file `module.xcconfig` to include any build time settings that should be set during application compilation that your module requires. This file will automatically get `#include` in the main application project. For more information about this file, please see the Apple documentation at: <http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/400-Build_Configurations/build_configs.html> INSTALL YOUR MODULE -------------------- 1. Run `build.py` which creates your distribution 2. cd to `/Library/Application Support/Titanium` 3. copy this zip file into the folder of your Titanium SDK REGISTER YOUR MODULE --------------------- Register your module with your application by editing `tiapp.xml` and adding your module. Example: <modules> <module version="0.5">netfunctional.snmp</module> </modules> When you run your project, the compiler will know automatically compile in your module dependencies and copy appropriate image assets into the application. USING YOUR MODULE IN CODE ------------------------- To use your module in code, you will need to require it. For example, var my_module = require('netfunctional.snmp'); my_module.foo(); WRITING PURE JS NATIVE MODULES ------------------------------ You can write a pure JavaScript "natively compiled" module. This is nice if you want to distribute a JS module pre-compiled. To create a module, create a file named netfunctional.snmp.js under the assets folder. This file must be in the Common JS format. For example: exports.echo = function(s) { return s; }; Any functions and properties that are exported will be made available as part of your module. All other code inside your JS will be private to your module. For pure JS module, you don't need to modify any of the Objective-C module code. You can leave it as-is and build. TESTING YOUR MODULE ------------------- Run the `titanium.py` script to test your module or test from within XCode. To test with the script, execute: titanium run --dir=YOURMODULEDIR This will execute the app.js in the example folder as a Titanium application.
About
Appcelerator Titanium SNMP Module
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published