I have an IDL looking something like this
module LMS
{
struct Alarm
{
string sensor;
string zone;
};
interface LMSIF
{
void raise_alarm(in Alarm aReading);
void send_alarm_to_rmc(in string alarm);
string test_case();
};
};
and a java file looking something like:
class LMSServant extends _LMSIFImplBase
{
Alarm al;
//functions here
public LMSServ()
{
//this line causes the problem.
al.sensor = "Sensor 1";
}
}
The problem i'm having is when i try to modify or write to the Alarm
struct i get a NullPointerException every time.
Am i doing something wrong?
Do i need to define anything extra to get an IDL struct to work as a
java class?
I tried redefining Alarm as a class with the same variables but this
caused all sorts of other errors..
Any help appreciated :)