INTEGER.c ( File view )

  • By lizhaoping1@163.com 2014-09-03
  • View(s):161
  • Download(s):9
  • Point(s): 3
			/*-
 * Copyright (c) 2003, 2004, 2005, 2006 Lev Walkin <vlm@lionet.info>.
 * All rights reserved.
 * Redistribution and modifications are permitted subject to BSD license.
 */
#include <asn_internal.h>
#include <INTEGER.h>
#include <asn_codecs_prim.h>	/* Encoder and decoder of a primitive type */
#include <errno.h>

/*
 * INTEGER basic type description.
 */
static ber_tlv_tag_t asn_DEF_INTEGER_tags[] = {

	(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))

};
asn_TYPE_descriptor_t asn_DEF_INTEGER = {

	"INTEGER",
	"INTEGER",
	ASN__PRIMITIVE_TYPE_free,
	NULL,
	asn_generic_no_constraint,
	ber_decode_primitive,
	INTEGER_encode_der,
	NULL,
	NULL,
	INTEGER_decode_uper,	/* Unaligned PER decoder */
	INTEGER_encode_uper,	/* Unaligned PER encoder */
	0, /* Use generic outmost tag fetcher */
	asn_DEF_INTEGER_tags,
	sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
	asn_DEF_INTEGER_tags,	/* Same as above */
	sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
	0,	/* No PER visible constraints */
	0, 0,	/* No members */
	0	/* No specifics */

};

/*
 * Encode INTEGER type using DER.
 */
asn_enc_rval_t
INTEGER_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
	int tag_mode, ber_tlv_tag_t tag,
	asn_app_consume_bytes_f *cb, void *app_key) {

	INTEGER_t *st = (INTEGER_t *)sptr;

	ASN_DEBUG("%s %s as INTEGER (tm=%d)",
		cb?"Encoding":"Estimating", td->name, tag_mode);

	/*
	 * Canonicalize integer in the buffer.
	 * (Remove too long sign extension, remove some first 0x00 bytes)
	 */
	if(st->buf) {

		uint8_t *buf = st->buf;
		uint8_t *end1 = buf + st->size - 1;
		int shift;

		/* Compute the number of superfluous leading bytes */
		for(; buf < end1; buf++) {

			/*
			 * If the contents octets of an integer value encoding
			 * consist of more than one octet, then the bits of the
			 * first octet and bit 8 of the second octet:
			 * a) shall not all be ones; and
			 * b) shall not all be zero.
			 */
			switch(*buf) {

			case 0x00: if((buf[1] & 0x80) == 0)
					continue;
				break;
			case 0xff: if((buf[1] & 0x80))
					continue;
				break;
			
}
			break;
		
}

		/* Remove leading superfluous bytes from the integer */
		shift = buf - st->buf;
		if(shift) {

			uint8_t *nb = st->buf;
			uint8_t *end;

			st->size -= shift;	/* New size, minus bad bytes */
			end = nb + st->size;

			for(; nb < end; nb++, buf++)
				*nb = *buf;
		
}

	
} /* if(1) */

	return der_encode_primitive(td, sptr, tag_mode, tag, cb, app_key);

}

static const asn_INTEGER_enum_map_t *INTEGER_map_enum2value(asn_INTEGER_specifics_t *specs, const char *lstart, const char *lstop);

#if 0
/*
 * INTEGER specific human-readable output.
 */
static ssize_t
INTEGER__dump(asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_bytes_f *cb, void *app_key, int plainOrXER) {

	asn_INTEGER_specifics_t *specs=(asn_INTEGER_specifics_t *)td->specifics;
	char scratch[32];	/* Enough for 64-bit integer */
	uint8_t *buf = st->buf;
	uint8_t *buf_end = st->buf + st->size;
	signed long accum;
	ssize_t wrote = 0;
	char *p;
	int ret;

	/*
	 * Advance buf pointer until the start of the value's body.
	 * This will make us able to process large integers using simple case,
	 * when the actual value is small
	 * (0x0000000000abcdef would yield a fine 0x00abcdef)
	 */
	/* Skip the insignificant leading bytes */
	for(; buf < buf_end-1; buf++) {

		switch(*buf) {

		case 0x00: if((buf[1] & 0x80) == 0) continue; break;
		case 0xff: if((buf[1] & 0x80) != 0) continue; break;
		
}
		break;
	
}

	/* Simple case: the integer size is small */
	if((size_t)(buf_end - buf) <= sizeof(accum)) {

		const asn_INTEGER_enum_map_t *el;
		size_t scrsize;
		char *scr;

		if(buf == buf_end) {

			accum = 0;
		
} else {

			accum = (*buf & 0x80) ? -1 : 0;
			for(; buf < buf_end; buf++)
				accum = (accum << 8) | *buf;
		
}

		el = INTEGER_map_value2enum(specs, accum);
		if(el) {

			scrsize = el->enum_len + 32;
			scr = (char *)alloca(scrsize);
			if(plainOrXER == 0)
				ret = snprintf(scr, scrsize,
					"%ld (%s)", accum, el->enum_name);
			else
				ret = snprintf(scr, scrsize,
					"<%s/>", el->enum_name);
		
} else if(plainOrXER && specs && specs->strict_enumeration) {

			ASN_DEBUG("ASN.1 forbids dealing with "
				"unknown value of ENUMERATED type");
			errno = EPERM;
			return -1;
		
} else {

			scrsize = sizeof(scratch);
			scr = scratch;
			ret = snprintf(scr, scrsize, "%ld", accum);
		
}
		assert(ret > 0 && (size_t)ret < scrsize);
		return (cb(scr, ret, app_key) < 0) ? -1 : ret;
	
} else if(plainOrXER && specs && specs->strict_enumeration) {

		/*
		 * Here and earlier, we cannot encode the ENUMERATED values
		 * if there is no corresponding identifier.
		 */
		ASN_DEBUG("ASN.1 forbids dealing with "
			"unknown value of ENUMERATED type");
		errno = EPERM;
		return -1;
	
}

	/* Output in the long xx:yy:zz... format */
	/* TODO: replace with generic algorithm (Knuth TAOCP Vol 2, 4.3.1) */
	for(p = scratch; buf < buf_end; buf++) {

		static const char *h2c = "0123456789ABCDEF";
		if((p - scratch) >= (ssize_t)(sizeof(scratch) - 4)) {

			/* Flush buffer */
			if(cb(scratch, p - scratch, app_key) < 0)
				return -1;
			wrote += p - scratch;
			p = scratch;
		
}
		*p++ = h2c[*buf >> 4];
		*p++ = h2c[*buf & 0x0F];
		*p++ = 0x3a;	/* ":" */
	
}
	if(p != scratch)
		p--;	/* Remove the last ":" */

	wrote += p - scratch;
	return (cb(scratch, p - scratch, app_key) < 0) ? -1 : wrote;

}
#endif


#if 0
/*
 * INTEGER specific human-readable output.
 */
int
INTEGER_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
	asn_app_consume_bytes_f *cb, void *app_key) {

	const INTEGER_t *st = (const INTEGER_t *)sptr;
	ssize_t ret;

	(void)td;
	(void)ilevel;

	if(!st || !st->buf)
		ret = cb("<absent>", 8, app_key);
	else
		ret = INTEGER__dump(td, st, cb, app_key, 0);

	return (ret < 0) ? -1 : 0;

}
#endif

struct e2v_key {

	const char *start;
	const char *stop;
	asn_INTEGER_enum_map_t *vemap;
	unsigned int *evmap;

};
static int
INTEGER__compar_enum2value(const void *kp, const void *am) {

	const struct e2v_key *key = (const struct e2v_key *)kp;
	const asn_INTEGER_enum_map_t *el = (const asn_INTEGER_enum_map_t *)am;
	const char *ptr, *end, *name;

	/* Remap the element (sort by different criterion) */
	el = key->vemap + key->evmap[el - key->vemap];

	/* Compare strings */
	for(ptr = key->start, end = key->stop, name = el->enum_name;
			ptr < end; ptr++, name++) {

		if(*ptr != *name)
			return *(const unsigned char *)ptr
				- *(const unsigned char *)name;
	
}
	return name[0] ? -1 : 0;

}

static const asn_INTEGER_enum_map_t *
INTEGER_map_enum2value(asn_INTEGER_specifics_t *specs, const char *lstart, const char *lstop) {

	asn_INTEGER_enum_map_t *el_found;
	int count = specs ? specs->map_count : 0;
	struct e2v_key key;
	const char *lp;

	if(!count) return NULL;

	/* Guaranteed: assert(lstart < lstop); */
	/* Figure out the tag name */
	for(lstart++, lp = lstart; lp < lstop; lp++) {

		switch(*lp) {

		case 9: case 10: case 11: case 12: case 13: case 32: /* WSP */
		case 0x2f: /* '/' */ case 0x3e: /* '>' */
			break;
		default:
			continue;
		
}
		break;
	
}
	if(lp == lstop) return NULL;	/* No tag found */
	lstop = lp;

	key.start = lstart;
	key.stop = lstop;
	key.vemap = specs->value2enum;
	key.evmap = specs->enum2value;
	el_found = (asn_INTEGER_enum_map_t *)bsearch(&key,
		specs->value2enum, count, sizeof(specs->value2enum[0]),
		INTEGER__compar_enum2value);
	if(el_found) {

		/* Remap enum2value into value2enum */
		el_found = key.vemap + key.evmap[el_found - key.vemap];
	
}
	return el_found;

}

static int
INTEGER__compar_value2enum(const void *kp, const void *am) {

	long a = *(const long *)kp;
	const asn_INTEGER_enum_map_t *el = (const asn_INTEGER_enum_map_t *)am;
	long b = el->nat_value;
	if(a < b) return -1;
	else if(a == b) return 0;
	else return 1;

}

const asn_INTEGER_enum_map_t *
INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value) {

	int count = specs ? specs->map_count : 0;
	if(!count) return 0;
	return (asn_INTEGER_enum_map_t *)bsearch(&value, specs->value2enum,
		count, sizeof(specs->value2enum[0]),
		INTEGER__compar_value2enum);

}

static int
INTEGER_st_prealloc(INTEGER_t *st, int min_size) {

	void *p = MALLOC(min_size + 1);
	if(p) {

		void *b = st->buf;
		st->size = 0;
		st->buf = p;
		FREEMEM(b);
		return 0;
	
} else {

		return -1;
	
}

}

#if 0
/*
 * Decode the chunk of XML text encoding INTEGER.
 */
static enum xer_pbd_rval
INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chunk_buf, size_t chunk_size) {

	INTEGER_t *st = (INTEGER_t *)sptr;
	long sign = 1;
	long value;
	const char *lp;
	const char *lstart = (const char *)chunk_buf;
	const char *lstop = lstart + chunk_size;
	enum {

		ST_SKIPSPACE,
		ST_SKIPSPHEX,
		ST_WAITDIGITS,
		ST_DIGITS,
		ST_HEXDIGIT1,
		ST_HEXDIGIT2,
		ST_HEXCOLON,
		ST_EXTRASTUFF
	
} state = ST_SKIPSPACE;

	if(chunk_size)
		ASN_DEBUG("INTEGER body %d 0x%2x..0x%2x",
			chunk_size, *lstart, lstop[-1]);

	/*
	 * We may have received a tag here. It will be processed inline.
	 * Use strtoul()-like code and serialize the result.
	 */
	for(value = 0, lp = lstart; lp < lstop; lp++) {

		int lv = *lp;
		switch(lv) {

		case 0x09: case 0x0a: case 0x0d: case 0x20:
			switch(state) {

			case ST_SKIPSPACE:
			case ST_SKIPSPHEX:
				continue;
			case ST_HEXCOLON:
				if(xer_is_whitespace(lp, lstop - lp)) {

					lp = lstop - 1;
					continue;
				
}
				break;
			default:
				break;
			
}
			break;
		case 0x2d:	/* '-' */
			if(state == ST_SKIPSPACE) {

				sign = -1;
				state = ST_WAITDIGITS;
				continue;
			
}
			break;
		case 0x2b:	/* '+' */
			if(state == ST_SKIPSPACE) {

				state = ST_WAITDIGITS;
				continue;
			
}
			break;
		case 0x30: case 0x31: case 0x32: case 0x33: case 0x34:
		case 0x35: case 0x36: case 0x37: case 0x38: case 0x39:
			switch(state) {

			case ST_DIGITS: break;
			case ST_SKIPSPHEX:	/* Fall through */
			case ST_HEXDIGIT1:
				value = (lv - 0x30) << 4;
				state = ST_HEXDIGIT2;
				continue;
			case ST_HEXDIGIT2:
				value += (lv - 0x30);
				state = ST_HEXCOLON;
				st->buf[st->size++] = value;
				continue;
			case ST_HEXCOLON:
				return XPBD_BROKEN_ENCODING;
			default:
				state = ST_DIGITS;
				break;
			
}

		    {

			long new_value = value * 10;

			if(new_value / 10 != value)
				/* Over
...
...
(Not finished, please download and read the complete file)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 3

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
01.97 kB
.gitattributes483.00 B2014-06-09 23:44
.gitignore2.58 kB2014-06-09 23:44
.travis.yml134.00 B2014-06-09 23:44
CHANGELOG12.04 kB2014-06-09 23:44
CMakeLists.txt3.87 kB2014-06-09 23:44
COPYING34.32 kB2014-06-09 23:44
Makefile5.55 kB2014-06-09 23:44
README.md4.33 kB2014-06-09 23:44
01.97 kB
stack_config.h4.45 kB2014-06-09 23:44
stack_config.h.cmake4.80 kB2014-06-09 23:44
01.97 kB
01.97 kB
CMakeLists.txt333.00 B2014-06-09 23:44
Makefile696.00 B2014-06-09 23:44
beagle_client.c3.00 kB2014-06-09 23:44
beagle_demo.c8.72 kB2014-06-09 23:44
beagle_demo.icd9.32 kB2014-06-09 23:44
beaglebone_leds.c1.02 kB2014-06-09 23:44
beaglebone_leds.h657.00 B2014-06-09 23:44
static_model.c46.48 kB2014-06-09 23:44
static_model.h19.73 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt927.00 B2014-06-09 23:44
Makefile1.06 kB2014-06-09 23:44
01.97 kB
Makefile478.00 B2014-06-09 23:44
goose_publisher_example.c966.00 B2014-06-09 23:44
01.97 kB
CMakeLists.txt549.00 B2014-06-09 23:44
Makefile480.00 B2014-06-09 23:44
goose_subscriber_example.c1.49 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt348.00 B2014-06-09 23:44
Makefile462.00 B2014-06-09 23:44
client_example1.c3.04 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt348.00 B2014-06-09 23:44
Makefile462.00 B2014-06-09 23:44
client_example2.c5.39 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt348.00 B2014-06-09 23:44
Makefile462.00 B2014-06-09 23:44
client_example3.c2.50 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt348.00 B2014-06-09 23:44
Makefile462.00 B2014-06-09 23:44
client_example4.c2.29 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt348.00 B2014-06-09 23:44
Makefile462.00 B2014-06-09 23:44
client_example5.c2.30 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt378.00 B2014-06-09 23:44
Makefile472.00 B2014-06-09 23:44
client_example_files.c2.10 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt402.00 B2014-06-09 23:44
Makefile480.00 B2014-06-09 23:44
client_example_reporting.c4.35 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt327.00 B2014-06-09 23:44
Makefile470.00 B2014-06-09 23:44
mms_client_example1.c1.38 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt327.00 B2014-06-09 23:44
Makefile470.00 B2014-06-09 23:44
mms_client_example2.c1.50 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt327.00 B2014-06-09 23:44
Makefile470.00 B2014-06-09 23:44
mms_client_example3.c703.00 B2014-06-09 23:44
01.97 kB
CMakeLists.txt327.00 B2014-06-09 23:44
Makefile470.00 B2014-06-09 23:44
mms_client_example4.c3.38 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt327.00 B2014-06-09 23:44
Makefile470.00 B2014-06-09 23:44
mms_client_example5.c1.08 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt279.00 B2014-06-09 23:44
Makefile454.00 B2014-06-09 23:44
mms_utility.c2.58 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt349.00 B2014-06-09 23:44
Makefile498.00 B2014-06-09 23:44
sampleModel_with_dataset.icd7.18 kB2014-06-09 23:44
server_example1.c1.87 kB2014-06-09 23:44
static_model.c39.73 kB2014-06-09 23:44
static_model.h16.46 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt349.00 B2014-06-09 23:44
Makefile654.00 B2014-06-09 23:44
complexModel.icd13.31 kB2014-06-09 23:44
server_example2.c2.35 kB2014-06-09 23:44
static_model.c92.27 kB2014-06-09 23:44
static_model.h39.48 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt349.00 B2014-06-09 23:44
Makefile615.00 B2014-06-09 23:44
server_example3.c4.39 kB2014-06-09 23:44
simpleIO_direct_control.icd9.83 kB2014-06-09 23:44
simpleIO_sbo_control.icd11.14 kB2014-06-09 23:44
static_model.c47.26 kB2014-06-09 23:44
static_model.h19.74 kB2014-06-09 23:44
01.97 kB
<SYSTEM.BIN>0.00 B2014-06-09 23:44
01.97 kB
CMakeLists.txt349.00 B2014-06-09 23:44
Makefile498.00 B2014-06-09 23:44
server_example4.c5.52 kB2014-06-09 23:44
simpleIO_direct_control.icd8.88 kB2014-06-09 23:44
static_model.c45.95 kB2014-06-09 23:44
static_model.h19.61 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt349.00 B2014-06-09 23:44
Makefile498.00 B2014-06-09 23:44
server_example5.c2.50 kB2014-06-09 23:44
simpleIO_direct_control.icd8.88 kB2014-06-09 23:44
static_model.c45.95 kB2014-06-09 23:44
static_model.h19.61 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt397.00 B2014-06-09 23:44
Makefile514.00 B2014-06-09 23:44
server_example_61400_25.c2.70 kB2014-06-09 23:44
static_model.c108.79 kB2014-06-09 23:44
static_model.h49.56 kB2014-06-09 23:44
wtur.icd13.51 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt361.00 B2014-06-09 23:44
Makefile502.00 B2014-06-09 23:44
mhai_array.icd11.90 kB2014-06-09 23:44
server_example_ca.c3.37 kB2014-06-09 23:44
static_model.c14.83 kB2014-06-09 23:44
static_model.h6.62 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt397.00 B2014-06-09 23:44
Makefile486.00 B2014-06-09 23:44
server_example_config_file.c3.57 kB2014-06-09 23:44
simpleIO_direct_control_goose.icd10.30 kB2014-06-09 23:44
01.97 kB
model.cfg3.18 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt391.00 B2014-06-09 23:44
Makefile512.00 B2014-06-09 23:44
server_example_control.c3.46 kB2014-06-09 23:44
simpleIO_control_tests.icd12.14 kB2014-06-09 23:44
static_model.c95.05 kB2014-06-09 23:44
static_model.h42.74 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt373.00 B2014-06-09 23:44
Makefile478.00 B2014-06-09 23:44
server_example_dynamic.c2.71 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt381.00 B2014-06-09 23:44
Makefile508.00 B2014-06-09 23:44
server_example_goose.c2.46 kB2014-06-09 23:44
simpleIO_direct_control_goose.icd10.48 kB2014-06-09 23:44
static_model.c47.96 kB2014-06-09 23:44
static_model.h19.61 kB2014-06-09 23:44
01.97 kB
common_targets.mk136.00 B2014-06-09 23:44
stack_includes.mk1.03 kB2014-06-09 23:44
target_system.mk3.13 kB2014-06-09 23:44
01.97 kB
CMakeLists.txt8.77 kB2014-06-09 23:44
01.97 kB
array_list.c980.00 B2014-06-09 23:44
array_list.h915.00 B2014-06-09 23:44
buffer_chain.c2.44 kB2014-06-09 23:44
buffer_chain.h1.37 kB2014-06-09 23:44
byte_buffer.c2.41 kB2014-06-09 23:44
byte_buffer.h1.54 kB2014-06-09 23:44
byte_stream.c2.74 kB2014-06-09 23:44
byte_stream.h1.18 kB2014-06-09 23:44
conversions.c5.74 kB2014-06-09 23:44
conversions.h1.25 kB2014-06-09 23:44
libiec61850_common_api.h432.00 B2014-06-09 23:44
libiec61850_platform_includes.h371.00 B2014-06-09 23:44
linked_list.c3.99 kB2014-06-09 23:44
linked_list.h4.28 kB2014-06-09 23:44
map.c3.51 kB2014-06-09 23:44
map.h1.44 kB2014-06-09 23:44
simple_allocator.c1.24 kB2014-06-09 23:44
simple_allocator.h1.13 kB2014-06-09 23:44
string_map.c990.00 B2014-06-09 23:44
string_map.h851.00 B2014-06-09 23:44
string_utilities.c4.21 kB2014-06-09 23:44
string_utilities.h1.80 kB2014-06-09 23:44
doxygen.config40.41 kB2014-06-09 23:44
01.97 kB
DoxygenLayout.xml5.71 kB2014-06-09 23:44
doxygen.css14.61 kB2014-06-09 23:44
doxygen.mod.css14.61 kB2014-06-09 23:44
footer.html717.00 B2014-06-09 23:44
header.html2.02 kB2014-06-09 23:44
libIEC61850_server.png29.26 kB2014-06-09 23:44
mainpage.doxygen4.99 kB2014-06-09 23:44
stylesheet.css19.97 kB2014-06-09 23:44
01.97 kB
goose_publisher.c9.50 kB2014-06-09 23:44
goose_publisher.h1.94 kB2014-06-09 23:44
goose_subscriber.c21.07 kB2014-06-09 23:44
goose_subscriber.h4.45 kB2014-06-09 23:44
iec61850_goose.asn1.58 kB2014-06-09 23:44
01.97 kB
01.97 kB
ethernet.h2.10 kB2014-06-09 23:44
01.97 kB
ethernet_linux.c4.18 kB2014-06-09 23:44
01.97 kB
ethernet_win32.c7.14 kB2014-06-09 23:44
01.97 kB
filesystem.h4.58 kB2014-06-09 23:44
01.97 kB
file_provider_linux.c4.89 kB2014-06-09 23:44
01.97 kB
file_provider_win32.c5.84 kB2014-06-09 23:44
hal.c1.62 kB2014-06-09 23:44
hal.h1.24 kB2014-06-09 23:44
platform_endian.h1.19 kB2014-06-09 23:44
01.97 kB
01.97 kB
socket_linux.c6.86 kB2014-06-09 23:44
socket.h2.12 kB2014-06-09 23:44
01.97 kB
socket_win32.c6.02 kB2014-06-09 23:44
01.97 kB
01.97 kB
thread_linux.c2.38 kB2014-06-09 23:44
thread.h2.47 kB2014-06-09 23:44
01.97 kB
thread_win32.c2.60 kB2014-06-09 23:44
01.97 kB
iec61850_client.h52.76 kB2014-06-09 23:44
01.97 kB
client_control.c15.13 kB2014-06-09 23:44
client_goose_control.c13.83 kB2014-06-09 23:44
client_report.c16.69 kB2014-06-09 23:44
client_report_control.c17.54 kB2014-06-09 23:44
ied_connection.c49.51 kB2014-06-09 23:44
ied_connection_private.h2.54 kB2014-06-09 23:44
01.97 kB
iec61850_common.c6.35 kB2014-06-09 23:44
iec61850_common.h6.58 kB2014-06-09 23:44
01.97 kB
iec61850_server.h23.26 kB2014-06-09 23:44
01.97 kB
client_connection.c2.71 kB2014-06-09 23:44
ied_server.c25.18 kB2014-06-09 23:44
ied_server_private.h2.03 kB2014-06-09 23:44
01.97 kB
control.c40.20 kB2014-06-09 23:44
control.h2.76 kB2014-06-09 23:44
mms_goose.c15.81 kB2014-06-09 23:44
mms_goose.h2.06 kB2014-06-09 23:44
mms_mapping.c59.09 kB2014-06-09 23:44
mms_mapping.h3.60 kB2014-06-09 23:44
mms_mapping_internal.h1.43 kB2014-06-09 23:44
reporting.c59.25 kB2014-06-09 23:44
reporting.h3.53 kB2014-06-09 23:44
01.97 kB
cdc.c37.87 kB2014-06-09 23:44
cdc.h15.62 kB2014-06-09 23:44
config_file_parser.c14.41 kB2014-06-09 23:44
config_file_parser.h1.13 kB2014-06-09 23:44
dynamic_model.c13.85 kB2014-06-09 23:44
dynamic_model.h7.54 kB2014-06-09 23:44
model.c9.45 kB2014-06-09 23:44
model.h8.68 kB2014-06-09 23:44
01.97 kB
01.97 kB
asn1_ber_primitive_value.c2.30 kB2014-06-09 23:44
asn1_ber_primitive_value.h1.46 kB2014-06-09 23:44
ber_decode.c2.89 kB2014-06-09 23:44
ber_decode.h1.34 kB2014-06-09 23:44
ber_encoder.c8.56 kB2014-06-09 23:44
ber_encoder.h2.66 kB2014-06-09 23:44
ber_integer.c5.05 kB2014-06-09 23:44
ber_integer.h2.06 kB2014-06-09 23:44
01.97 kB
acse.c18.09 kB2014-06-09 23:44
acse.h2.70 kB2014-06-09 23:44
01.97 kB
01.97 kB
iso_client_connection.c14.15 kB2014-06-09 23:44
iso_client_connection.h2.71 kB2014-06-09 23:44
01.97 kB
iso_connection_parameters.c2.85 kB2014-06-09 23:44
iso_connection_parameters.h6.42 kB2014-06-09 23:44
01.97 kB
cotp.c15.71 kB2014-06-09 23:44
cotp.h2.27 kB2014-06-09 23:44
01.97 kB
01.97 kB
AccessResult.c7.04 kB2014-06-09 23:44
AccessResult.h1.95 kB2014-06-09 23:44
Address.c2.26 kB2014-06-09 23:44
Address.h1.00 kB2014-06-09 23:44
AlternateAccess.c5.71 kB2014-06-09 23:44
AlternateAccess.h1.59 kB2014-06-09 23:44
AlternateAccessSelection.c14.86 kB2014-06-09 23:44
AlternateAccessSelection.h3.68 kB2014-06-09 23:44
BIT_STRING.c4.45 kB2014-06-09 23:44
BIT_STRING.h824.00 B2014-06-09 23:44
BOOLEAN.c6.17 kB2014-06-09 23:44
BOOLEAN.h891.00 B2014-06-09 23:44
ConcludeRequestPDU.c3.78 kB2014-06-09 23:44
ConcludeRequestPDU.h892.00 B2014-06-09 23:44
ConcludeResponsePDU.c3.81 kB2014-06-09 23:44
ConcludeResponsePDU.h905.00 B2014-06-09 23:44
ConfirmedErrorPDU.c2.25 kB2014-06-09 23:44
ConfirmedErrorPDU.h768.00 B2014-06-09 23:44
ConfirmedRequestPdu.c2.76 kB2014-06-09 23:44
ConfirmedRequestPdu.h815.00 B2014-06-09 23:44
ConfirmedResponsePdu.c2.78 kB2014-06-09 23:44
ConfirmedResponsePdu.h825.00 B2014-06-09 23:44
ConfirmedServiceRequest.c4.24 kB2014-06-09 23:44
ConfirmedServiceRequest.h1.85 kB2014-06-09 23:44
ConfirmedServiceResponse.c4.27 kB2014-06-09 23:44
ConfirmedServiceResponse.h1.88 kB2014-06-09 23:44
Data.c6.45 kB2014-06-09 23:44
Data.h1.74 kB2014-06-09 23:44
DataAccessError.c3.73 kB2014-06-09 23:44
DataAccessError.h1.39 kB2014-06-09 23:44
DataSequence.c1.44 kB2014-06-09 23:44
DataSequence.h783.00 B2014-06-09 23:44
DefineNamedVariableListRequest.c6.49 kB2014-06-09 23:44
DefineNamedVariableListRequest.h1.50 kB2014-06-09 23:44
DefineNamedVariableListResponse.c4.19 kB2014-06-09 23:44
DefineNamedVariableListResponse.h1.04 kB2014-06-09 23:44
DeleteNamedVariableListRequest.c4.95 kB2014-06-09 23:44
DeleteNamedVariableListRequest.h1.66 kB2014-06-09 23:44
DeleteNamedVariableListResponse.c2.55 kB2014-06-09 23:44
DeleteNamedVariableListResponse.h844.00 B2014-06-09 23:44
FloatingPoint.c3.73 kB2014-06-09 23:44
FloatingPoint.h843.00 B2014-06-09 23:44
GeneralizedTime.c14.41 kB2014-06-09 23:44
GeneralizedTime.h2.16 kB2014-06-09 23:44
GetNameListRequest.c4.91 kB2014-06-09 23:44
GetNameListRequest.h1.46 kB2014-06-09 23:44
GetNameListResponse.c3.76 kB2014-06-09 23:44
GetNameListResponse.h1,016.00 B2014-06-09 23:44
GetNamedVariableListAttributesRequest.c4.05 kB2014-06-09 23:44
GetNamedVariableListAttributesRequest.h1.12 kB2014-06-09 23:44
GetNamedVariableListAttributesResponse.c6.58 kB2014-06-09 23:44
GetNamedVariableListAttributesResponse.h1.63 kB2014-06-09 23:44
GetVariableAccessAttributesRequest.c2.23 kB2014-06-09 23:44
GetVariableAccessAttributesRequest.h1.23 kB2014-06-09 23:44
GetVariableAccessAttributesResponse.c3.02 kB2014-06-09 23:44
GetVariableAccessAttributesResponse.h1.02 kB2014-06-09 23:44
INTEGER.c19.92 kB2014-06-09 23:44
INTEGER.h1.97 kB2014-06-09 23:44
Identifier.c3.65 kB2014-06-09 23:44
Identifier.h806.00 B2014-06-09 23:44
IndexRangeSeq.c2.18 kB2014-06-09 23:44
IndexRangeSeq.h716.00 B2014-06-09 23:44
InformationReport.c3.84 kB2014-06-09 23:44
InformationReport.h1.10 kB2014-06-09 23:44
InitRequestDetail.c2.74 kB2014-06-09 23:44
InitRequestDetail.h896.00 B2014-06-09 23:44
InitResponseDetail.c2.77 kB2014-06-09 23:44
InitResponseDetail.h906.00 B2014-06-09 23:44
InitiateErrorPdu.c3.83 kB2014-06-09 23:44
InitiateErrorPdu.h882.00 B2014-06-09 23:44
InitiateRequestPdu.c3.62 kB2014-06-09 23:44
InitiateRequestPdu.h1,021.00 B2014-06-09 23:44
InitiateResponsePdu.c3.66 kB2014-06-09 23:44
InitiateResponsePdu.h1.01 kB2014-06-09 23:44
Integer16.c3.84 kB2014-06-09 23:44
Integer16.h782.00 B2014-06-09 23:44
Integer32.c3.85 kB2014-06-09 23:44
Integer32.h782.00 B2014-06-09 23:44
Integer8.c3.81 kB2014-06-09 23:44
Integer8.h769.00 B2014-06-09 23:44
ListOfVariableSeq.c2.58 kB2014-06-09 23:44
ListOfVariableSeq.h915.00 B2014-06-09 23:44
MMSString.c3.58 kB2014-06-09 23:44
MMSString.h787.00 B2014-06-09 23:44
MmsPdu.c4.98 kB2014-06-09 23:44
MmsPdu.h1.72 kB2014-06-09 23:44
NULL.c3.33 kB2014-06-09 23:44
NULL.h713.00 B2014-06-09 23:44
NativeEnumerated.c5.57 kB2014-06-09 23:44
NativeEnumerated.h897.00 B2014-06-09 23:44
NativeInteger.c5.56 kB2014-06-09 23:44
NativeInteger.h1.07 kB2014-06-09 23:44
OCTET_STRING.c39.24 kB2014-06-09 23:44
OCTET_STRING.h2.53 kB2014-06-09 23:44
ObjectClass.c1.55 kB2014-06-09 23:44
ObjectClass.h1.62 kB2014-06-09 23:44
ObjectName.c4.31 kB2014-06-09 23:44
ObjectName.h1.19 kB2014-06-09 23:44
ParameterSupportOptions.c4.03 kB2014-06-09 23:44
ParameterSupportOptions.h1.37 kB2014-06-09 23:44
ReadRequest.c2.23 kB2014-06-09 23:44
ReadRequest.h800.00 B2014-06-09 23:44
ReadResponse.c3.70 kB2014-06-09 23:44
ReadResponse.h1.16 kB2014-06-09 23:44
RejectPDU.c11.90 kB2014-06-09 23:44
RejectPDU.h4.96 kB2014-06-09 23:44
ScatteredAccessDescription.c4.13 kB2014-06-09 23:44
ScatteredAccessDescription.h1.31 kB2014-06-09 23:44
ServiceError.c8.47 kB2014-06-09 23:44
ServiceError.h6.74 kB2014-06-09 23:44
ServiceSupportOptions.c3.96 kB2014-06-09 23:44
ServiceSupportOptions.h4.88 kB2014-06-09 23:44
StructComponent.c2.23 kB2014-06-09 23:44
StructComponent.h875.00 B2014-06-09 23:44
TimeOfDay.c3.61 kB2014-06-09 23:44
TimeOfDay.h791.00 B2014-06-09 23:44
TypeSpecification.c14.98 kB2014-06-09 23:44
TypeSpecification.h3.05 kB2014-06-09 23:44
UTF8String.c4.63 kB2014-06-09 23:44
UTF8String.h1.27 kB2014-06-09 23:44
UnconfirmedPDU.c1.82 kB2014-06-09 23:44
UnconfirmedPDU.h716.00 B2014-06-09 23:44
UnconfirmedService.c1.67 kB2014-06-09 23:44
UnconfirmedService.h996.00 B2014-06-09 23:44
Unsigned16.c3.87 kB2014-06-09 23:44
Unsigned16.h795.00 B2014-06-09 23:44
Unsigned32.c3.97 kB2014-06-09 23:44
Unsigned32.h794.00 B2014-06-09 23:44
Unsigned8.c3.84 kB2014-06-09 23:44
Unsigned8.h782.00 B2014-06-09 23:44
UtcTime.c3.79 kB2014-06-09 23:44
UtcTime.h765.00 B2014-06-09 23:44
VariableAccessSpecification.c3.63 kB2014-06-09 23:44
VariableAccessSpecification.h1.55 kB2014-06-09 23:44
VariableSpecification.c6.73 kB2014-06-09 23:44
VariableSpecification.h1.76 kB2014-06-09 23:44
VisibleString.c1.95 kB2014-06-09 23:44
VisibleString.h511.00 B2014-06-09 23:44
WriteRequest.c3.57 kB2014-06-09 23:44
WriteRequest.h1.06 kB2014-06-09 23:44
WriteResponse.c3.21 kB2014-06-09 23:44
WriteResponse.h1.24 kB2014-06-09 23:44
asn_SEQUENCE_OF.c880.00 B2014-06-09 23:44
asn_SEQUENCE_OF.h1.47 kB2014-06-09 23:44
asn_SET_OF.c1.67 kB2014-06-09 23:44
asn_SET_OF.h1.65 kB2014-06-09 23:44
asn_application.h1.45 kB2014-06-09 23:44
asn_codecs.h3.35 kB2014-06-09 23:44
asn_codecs_prim.c6.65 kB2014-06-09 23:44
asn_codecs_prim.h1.59 kB2014-06-09 23:44
asn_internal.h3.21 kB2014-06-09 23:44
asn_system.h2.61 kB2014-06-09 23:44
ber_decoder.c7.49 kB2014-06-09 23:44
ber_decoder.h1.92 kB2014-06-09 23:44
ber_tlv_length.c3.70 kB2014-06-09 23:44
ber_tlv_length.h1.50 kB2014-06-09 23:44
ber_tlv_tag.c3.12 kB2014-06-09 23:44
ber_tlv_tag.h1.79 kB2014-06-09 23:44
constr_CHOICE.c27.66 kB2014-06-09 23:44
constr_CHOICE.h1.37 kB2014-06-09 23:44
constr_SEQUENCE.c31.06 kB2014-06-09 23:44
constr_SEQUENCE.h1.49 kB2014-06-09 23:44
constr_SEQUENCE_OF.c5.25 kB2014-06-09 23:44
constr_SEQUENCE_OF.h930.00 B2014-06-09 23:44
constr_SET_OF.c22.54 kB2014-06-09 23:44
constr_SET_OF.h1.04 kB2014-06-09 23:44
constr_TYPE.c1.72 kB2014-06-09 23:44
constr_TYPE.h6.54 kB2014-06-09 23:44
constraints.c2.19 kB2014-06-09 23:44
constraints.h1.92 kB2014-06-09 23:44
der_encoder.c4.91 kB2014-06-09 23:44
der_encoder.h1.82 kB2014-06-09 23:44
per_decoder.c1.49 kB2014-06-09 23:44
per_decoder.h1.16 kB2014-06-09 23:44
per_encoder.c2.17 kB2014-06-09 23:44
per_encoder.h1.26 kB2014-06-09 23:44
per_support.c7.06 kB2014-06-09 23:44
per_support.h3.19 kB2014-06-09 23:44
xer_decoder.c8.51 kB2014-06-09 23:44
xer_decoder.h3.26 kB2014-06-09 23:44
xer_encoder.c1.50 kB2014-06-09 23:44
xer_encoder.h1.66 kB2014-06-09 23:44
xer_support.c5.42 kB2014-06-09 23:44
xer_support.h1.77 kB2014-06-09 23:44
01.97 kB
mms_client_common.c1.57 kB2014-06-09 23:44
mms_client_connection.c53.58 kB2014-06-09 23:44
mms_client_connection.h24.85 kB2014-06-09 23:44
mms_client_files.c17.13 kB2014-06-09 23:44
mms_client_get_namelist.c7.40 kB2014-06-09 23:44
mms_client_get_var_access.c6.49 kB2014-06-09 23:44
mms_client_identify.c3.31 kB2014-06-09 23:44
mms_client_initiate.c5.01 kB2014-06-09 23:44
mms_client_internal.h7.44 kB2014-06-09 23:44
mms_client_named_variable_list.c15.23 kB2014-06-09 23:44
mms_client_read.c20.54 kB2014-06-09 23:44
mms_client_status.c3.38 kB2014-06-09 23:44
mms_client_write.c11.05 kB2014-06-09 23:44
01.97 kB
mms_common.h4.20 kB2014-06-09 23:44
mms_common_internal.h1.55 kB2014-06-09 23:44
mms_common_msg.c21.87 kB2014-06-09 23:44
mms_type_spec.c4.97 kB2014-06-09 23:44
mms_type_spec.h2.28 kB2014-06-09 23:44
mms_types.h2.22 kB2014-06-09 23:44
mms_value.c39.51 kB2014-06-09 23:44
mms_value.h22.04 kB2014-06-09 23:44
mms_value_internal.h1.78 kB2014-06-09 23:44
01.97 kB
mms_access_result.c6.72 kB2014-06-09 23:44
mms_access_result.h1.01 kB2014-06-09 23:44
mms_association_service.c7.98 kB2014-06-09 23:44
mms_device.c1.44 kB2014-06-09 23:44
mms_device_model.h4.19 kB2014-06-09 23:44
mms_domain.c5.16 kB2014-06-09 23:44
mms_file_service.c20.75 kB2014-06-09 23:44
mms_get_namelist_service.c12.09 kB2014-06-09 23:44
mms_get_var_access_service.c10.82 kB2014-06-09 23:44
mms_identify_service.c3.20 kB2014-06-09 23:44
mms_information_report.c9.53 kB2014-06-09 23:44
mms_named_variable_list.c2.82 kB2014-06-09 23:44
mms_named_variable_list.h1.91 kB2014-06-09 23:44
mms_named_variable_list_service.c15.43 kB2014-06-09 23:44
mms_read_service.c20.38 kB2014-06-09 23:44
mms_server.c6.44 kB2014-06-09 23:44
mms_server.h8.12 kB2014-06-09 23:44
mms_server_common.c6.65 kB2014-06-09 23:44
mms_server_connection.c12.13 kB2014-06-09 23:44
mms_server_connection.h3.24 kB2014-06-09 23:44
mms_server_internal.h6.17 kB2014-06-09 23:44
mms_status_service.c3.42 kB2014-06-09 23:44
mms_value_cache.c3.66 kB2014-06-09 23:44
mms_value_cache.h1.24 kB2014-06-09 23:44
mms_write_service.c8.21 kB2014-06-09 23:44
01.97 kB
iso_presentation.c20.85 kB2014-06-09 23:44
iso_presentation.h2.05 kB2014-06-09 23:44
01.97 kB
iso_connection.c17.74 kB2014-06-09 23:44
iso_server.c9.22 kB2014-06-09 23:44
iso_server.h2.95 kB2014-06-09 23:44
iso_server_private.h1.42 kB2014-06-09 23:44
01.97 kB
iso_session.c15.21 kB2014-06-09 23:44
iso_session.h2.10 kB2014-06-09 23:44
01.97 kB
sv.asn1744.00 B2014-06-09 23:44
sv_publisher.c9.39 kB2014-06-09 23:44
01.97 kB
libiec61850-wo-goose.def15.47 kB2014-06-09 23:44
libiec61850.def16.43 kB2014-06-09 23:44
stdbool.h46.00 B2014-06-09 23:44
01.97 kB
01.97 kB
build.sh196.00 B2014-06-09 23:44
build2.sh205.00 B2014-06-09 23:44
complexModel.icd13.00 kB2014-06-09 23:44
genconfig.jar68.45 kB2014-06-09 23:44
genericIO.icd5.19 kB2014-06-09 23:44
genmodel.jar68.37 kB2014-06-09 23:44
inverter3ph.icd6.88 kB2014-06-09 23:44
inverter_with_report.icd10.20 kB2014-06-09 23:44
manifest-dynamic.mf78.00 B2014-06-09 23:44
manifest.mf77.00 B2014-06-09 23:44
sampleModel.icd6.37 kB2014-06-09 23:44
sampleModel_errors.icd6.35 kB2014-06-09 23:44
sampleModel_with_dataset.icd8.12 kB2014-06-09 23:44
simpleIO_direct_control_goose.scd10.48 kB2014-06-09 23:44
01.97 kB
01.97 kB
01.97 kB
01.97 kB
DataAttributeDefinition.java3.52 kB2014-06-09 23:44
DataObjectDefinition.java1.67 kB2014-06-09 23:44
ParserUtils.java3.06 kB2014-06-09 23:44
SclParser.java9.80 kB2014-06-09 23:44
SclParserException.java1.65 kB2014-06-09 23:44
01.97 kB
Communication.java1.58 kB2014-06-09 23:44
ConnectedAP.java2.14 kB2014-06-09 23:44
GSE.java1.83 kB2014-06-09 23:44
GSEAddress.java3.14 kB2014-06-09 23:44
SubNetwork.java1.88 kB2014-06-09 23:44
01.97 kB
AccessPoint.java1.65 kB2014-06-09 23:44
AttributeType.java4.53 kB2014-06-09 23:44
Authentication.java1,002.00 B2014-06-09 23:44
DataAttribute.java5.39 kB2014-06-09 23:44
DataModelNode.java1.06 kB2014-06-09 23:44
DataModelValue.java3.42 kB2014-06-09 23:44
DataObject.java4.04 kB2014-06-09 23:44
DataSet.java1.79 kB2014-06-09 23:44
FunctionalConstraint.java1.58 kB2014-06-09 23:44
FunctionalConstraintData.java2.84 kB2014-06-09 23:44
GSEControl.java2.53 kB2014-06-09 23:44
IED.java2.02 kB2014-06-09 23:44
Log.java1.23 kB2014-06-09 23:44
LogControl.java3.28 kB2014-06-09 23:44
LogicalDevice.java2.25 kB2014-06-09 23:44
LogicalNode.java9.07 kB2014-06-09 23:44
OptionFields.java3.78 kB2014-06-09 23:44
ReportControlBlock.java3.96 kB2014-06-09 23:44
RptEnabled.java558.00 B2014-06-09 23:44
Server.java1.93 kB2014-06-09 23:44
SettingControl.java1.62 kB2014-06-09 23:44
TriggerOptions.java2.73 kB2014-06-09 23:44
01.97 kB
DataAttributeType.java1.69 kB2014-06-09 23:44
DataObjectType.java2.29 kB2014-06-09 23:44
EnumerationType.java3.28 kB2014-06-09 23:44
EnumerationValue.java1.53 kB2014-06-09 23:44
IllegalValueException.java963.00 B2014-06-09 23:44
LogicalNodeType.java1.92 kB2014-06-09 23:44
SclType.java1.45 kB2014-06-09 23:44
TypeDeclarations.java1.90 kB2014-06-09 23:44
01.97 kB
DynamicModelGenerator.java12.71 kB2014-06-09 23:44
StaticModelGenerator.java31.45 kB2014-06-09 23:44
...
Sponsored links

INTEGER.c (1,014.52 kB)

Need 3 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D