aboutsummaryrefslogtreecommitdiffstats
path: root/dvb-t/sk-KralovskyChlmec
blob: b5ac2f796a1cd9aabc4edf51cda19b88d9f8ff32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# DVB-T Kralovsky Chlmec (Kralovsky Chlmec, Slovak Republic)
# Created from http://www.dvbt.towercom.sk/odbornici.php
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy

# 2.st multiplex (commercial) - on channel 59
[CHANNEL]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 778000000
	BANDWIDTH_HZ = 8000000
	CODE_RATE_HP = 2/3
	CODE_RATE_LP = NONE
	MODULATION = QAM/64
	TRANSMISSION_MODE = 8K
	GUARD_INTERVAL = 1/4
	HIERARCHY = NONE
	INVERSION = AUTO


# 3.st multiplex (public) - on channel 25
[CHANNEL]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 506000000
	BANDWIDTH_HZ = 8000000
	CODE_RATE_HP = 2/3
	CODE_RATE_LP = NONE
	MODULATION = QAM/64
	TRANSMISSION_MODE = 8K
	GUARD_INTERVAL = 1/4
	HIERARCHY = NONE
	INVERSION = AUTO
003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include "../stdafx.h"
#include <stdlib.h>
#include "../cphidget.h"
#include "phidget_jni.h"
#include <stdio.h>

JavaVM *ph_vm = 0;

jclass phidget_class;
jmethodID phidget_cons;

jclass ph_exception_class;
jmethodID ph_exception_cons;

jclass attachEvent_class;
jmethodID attachEvent_cons;

jclass detachEvent_class;
jmethodID detachEvent_cons;

jclass errorEvent_class;
jmethodID errorEvent_cons;

jclass serverConnectEvent_class;
jmethodID serverConnectEvent_cons;

jclass serverDisconnectEvent_class;
jmethodID serverDisconnectEvent_cons;

#ifdef _WINDOWS

extern int useThreadSecurity;
extern void destroyThreadSecurityAttributes();

#endif

jint JNICALL
JNI_OnLoad(JavaVM *vm, void *reserved)
{
	JNIEnv *env;
	jint version = 0;
	jint result;

	ph_vm = vm;

	// Don't set thread security when we're using Java -  this break events.
	#ifdef _WINDOWS
		useThreadSecurity = PFALSE;
		destroyThreadSecurityAttributes();
	#endif

	result = (*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_4);
	
	if(result == JNI_EDETACHED)
		if ((*vm)->AttachCurrentThread(vm, (JNIEnvPtr)&env, NULL))
			JNI_ABORT_STDERR("Couldn't Attach Thread");
	
	if(!(version = (*env)->GetVersion(env)))
		JNI_ABORT_STDERR("Couldn't get version");
	LOG(PHIDGET_LOG_DEBUG,"JNI Version: %08x",version);

	//Load all Phidget classes, and needed methods and fields...
	//Phidget
	if (!(phidget_class = (*env)->FindClass(env, "com/phidgets/Phidget")))
		JNI_ABORT_STDERR("");
	if (!(phidget_class = (jclass)(*env)->NewGlobalRef(env, phidget_class)))
		JNI_ABORT_STDERR("");
	if (!(phidget_cons = (*env)->GetMethodID(env, phidget_class, "<init>", "(J)V")))
		JNI_ABORT_STDERR("");

	//PhidgetException
	if (!(ph_exception_class = (*env)->FindClass(env, "com/phidgets/PhidgetException")))
		JNI_ABORT_STDERR("Coulnd't FindClass com/phidgets/PhidgetException");
	if (!(ph_exception_class = (jclass)(*env)->NewGlobalRef(env, ph_exception_class)))
		JNI_ABORT_STDERR("Couldn't create global ref ph_exception_class");
	if (!(ph_exception_cons = (*env)->GetMethodID(env, ph_exception_class, "<init>", "(ILjava/lang/String;)V")))
		JNI_ABORT_STDERR("Couldn't get Method ID <init> from ph_exception_class");

	//AttachEvent
	if (!(attachEvent_class = (*env)->FindClass(env, "com/phidgets/event/AttachEvent")))
		JNI_ABORT_STDERR("Coulnd't FindClass com/phidgets/AttachEvent");
	if (!(attachEvent_class = (jclass)(*env)->NewGlobalRef(env, attachEvent_class)))
		JNI_ABORT_STDERR("Couldn't create global ref attachEvent_class");
	if (!(attachEvent_cons = (*env)->GetMethodID(env, attachEvent_class, "<init>", "(Lcom/phidgets/Phidget;)V")))
		JNI_ABORT_STDERR("Couldn't get method ID <init> from attachEvent_class");

	//DetachEvent
	if (!(detachEvent_class = (*env)->FindClass(env, "com/phidgets/event/DetachEvent")))
		JNI_ABORT_STDERR("Coulnd't FindClass com/phidgets/DetachEvent");
	if (!(detachEvent_class = (jclass)(*env)->NewGlobalRef(env, detachEvent_class)))
		JNI_ABORT_STDERR("Couldn't create global ref detachEvent_class");
	if (!(detachEvent_cons = (*env)->GetMethodID(env, detachEvent_class, "<init>", "(Lcom/phidgets/Phidget;)V")))
		JNI_ABORT_STDERR("Couldn't get method ID <init> from detachEvent_class");

	//ErrorEvent
	if (!(errorEvent_class = (*env)->FindClass(env, "com/phidgets/event/ErrorEvent")))
		JNI_ABORT_STDERR("Coulnd't FindClass com/phidgets/ErrorEvent");
	if (!(errorEvent_class = (jclass)(*env)->NewGlobalRef(env, errorEvent_class)))
		JNI_ABORT_STDERR("Couldn't create global ref errorEvent_class");
	if (!(errorEvent_cons = (*env)->GetMethodID(env, errorEvent_class, "<init>", "(Lcom/phidgets/Phidget;Lcom/phidgets/PhidgetException;)V")))
		JNI_ABORT_STDERR("Couldn't get method ID <init> from errorEvent_class");

	//ServerConnectEvent
	if (!(serverConnectEvent_class = (*env)->FindClass(env, "com/phidgets/event/ServerConnectEvent")))
		JNI_ABORT_STDERR("Couldn't FindClass com/phidgets/ServerConnectEvent");
	if (!(serverConnectEvent_class = (jclass)(*env)->NewGlobalRef(env, serverConnectEvent_class)))
		JNI_ABORT_STDERR("Couldn't create global ref serverConnectEvent_class");
	if (!(serverConnectEvent_cons = (*env)->GetMethodID(env, serverConnectEvent_class, "<init>", "(Ljava/lang/Object;)V")))
		JNI_ABORT_STDERR("Couldn't get method ID <init> from serverConnectEvent_class");

	//ServerDisconnectEvent
	if (!(serverDisconnectEvent_class = (*env)->FindClass(env, "com/phidgets/event/ServerDisconnectEvent")))
		JNI_ABORT_STDERR("Couldn't FindClass com/phidgets/ServerDisconnectEvent");
	if (!(serverDisconnectEvent_class = (jclass)(*env)->NewGlobalRef(env, serverDisconnectEvent_class)))
		JNI_ABORT_STDERR("Couldn't create global ref serverDisconnectEvent_class");
	if (!(serverDisconnectEvent_cons = (*env)->GetMethodID(env, serverDisconnectEvent_class, "<init>", "(Ljava/lang/Object;)V")))
		JNI_ABORT_STDERR("Couldn't get method ID <init> from serverDisconnectEvent_class");

	com_phidgets_Phidget_OnLoad(env);
	com_phidgets_Manager_OnLoad(env);
	com_phidgets_Dictionary_OnLoad(env);
	com_phidgets_DictionaryKeyListener_OnLoad(env);
	com_phidgets_AccelerometerPhidget_OnLoad(env);
	com_phidgets_AdvancedServoPhidget_OnLoad(env);
	com_phidgets_AnalogPhidget_OnLoad(env);
	com_phidgets_BridgePhidget_OnLoad(env);
	com_phidgets_EncoderPhidget_OnLoad(env);
    com_phidgets_FrequencyCounterPhidget_OnLoad(env);
    com_phidgets_GPSPhidget_OnLoad(env);
	com_phidgets_InterfaceKitPhidget_OnLoad(env);
	com_phidgets_IRPhidget_OnLoad(env);
	com_phidgets_LEDPhidget_OnLoad(env);
	com_phidgets_MotorControlPhidget_OnLoad(env);
	com_phidgets_PHSensorPhidget_OnLoad(env);
	com_phidgets_RFIDPhidget_OnLoad(env);
	com_phidgets_ServoPhidget_OnLoad(env);
	com_phidgets_SpatialPhidget_OnLoad(env);
	com_phidgets_StepperPhidget_OnLoad(env);
	com_phidgets_TemperatureSensorPhidget_OnLoad(env);
	com_phidgets_TextLCDPhidget_OnLoad(env);
	com_phidgets_TextLEDPhidget_OnLoad(env);
	com_phidgets_WeightSensorPhidget_OnLoad(env);
	
#ifdef _ANDROID
	if(com_phidgets_usb_Phidget_OnLoad(env) && com_phidgets_usb_Manager_OnLoad(env))
		AndroidUsbJarAvailable = PTRUE;
	else
		AndroidUsbJarAvailable = PFALSE;
#endif

	return JNI_VERSION_1_4;
}

jlong
updateGlobalRef(JNIEnv *env, jobject obj, jfieldID fid, jboolean b)
{
	/*
	 * Manages the global reference held by phidget21 to the handler
	 * target.
	 */
	jlong gr;

	if ((gr = (*env)->GetLongField(env, obj, fid)) != 0)
		(*env)->DeleteGlobalRef(env, (jobject)(uintptr_t)gr);
	gr = b ? (jlong)(uintptr_t)(*env)->NewGlobalRef(env, obj) : 0;
	(*env)->SetLongField(env, obj, fid, gr);

	return gr;
}