Appcelerator Titanium SNMP Module
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Classes
assets
documentation
example
hooks
include
lib
netfunctional_snmp.xcodeproj
platform
.gitignore
LICENSE
NetfunctionalSnmpSnmpClientProxy.h
NetfunctionalSnmpSnmpClientProxy.m
NetfunctionalSnmp_Prefix.pch
README
README.compiling
build.py
manifest
module.xcconfig
netfunctional.snmp-iphone-0.5.zip
netsnmp_adapter.c
timodule.xml
titanium.xcconfig

README

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.