News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

EIB read function requirement

Started by guigolum, June 14, 2008, 02:24:39 PM

Previous topic - Next topic

guigolum

hi, i am trying to implement the read function on the eib programm.

but i don't know what is it supposed to do:
do one know where i could get the base idea of this function? the comments are not.. present, so i don't even know:
is the adress parameter supposed to be a filter?(the adress group of the eibd)? i think so because the overload makes a copy of it, meaning the adress isn't changed. this way of working means read(adress) only pops the last message sent on the bus with the destination of(adress). but i rather be sure of it.
the same way is, if there is no message on bus, how to make the calling program understand it? the function doesn't throw an exception.


i think it's gonna be the same for other functions, so i wold appreciate one to give me tips for getting the way to implement these functions. i could try to get every documentation i can, but i think it would be too long..

thanx :)

tschak909

I would seriously take some time, to look at the other DCE devices in the tree (pretty much everything under src/), the functions are implemented in a similar manner, and may provide insight.

-Thom

guigolum

#2
thank you, i do it and ask for any question.. or for the answer

guigolum

it seems not to work..

what i've done:

search in the full tree for any file including the EIB_Read word.
for this problem i got only this result:(took me an hour or so to search with find, grep)

./src/Windows_Share_Scanner/Windows_Share_Scanner
./src/Windows_Share_Scanner/.svn/text-base/Windows_Share_Scanner.svn-base
./src/pluto_main/.svn/text-base/Define_Command.h.svn-base
./src/pluto_main/Define_Command.h
./src/Gen_Devices/.svn/text-base/AllCommandsRequests.h.svn-base
./src/Gen_Devices/.svn/text-base/EIBBase.h.svn-base
./src/Gen_Devices/AllCommandsRequests.h
./src/Gen_Devices/EIBBase.h
./src/EIB/.svn/text-base/EIB.cpp.svn-base
./src/EIB/.svn/text-base/EIB.h.svn-base
./src/EIB/EIB.h
./src/EIB/EIB.cpp

several of them are no code.
excluding the EIB.h /.cpp files, i have:

./src/pluto_main/Define_Command.h only defines consts

./src/EIB/.svn/text-base/EIB.cpp.svn-base and ./src/EIB/.svn/text-base/EIB.h.svn-base are just copies of EIB.h and EIB.cpp

in ./src/Gen_Devices/EIBBase.h is only the name of the function, to override.

./src/Gen_Devices/AllCommandsRequests.h just declares functions, doesnt use em.

so i just don't understand where is that function supposed to be used in?

tschak909

dude...

sounds like you need to spend some time looking at the EIB interfaces and protocol specifications to figure out what you need to do.

-Thom

guigolum

ok, it was very simple actually. i am not sure how the telegram is supposed to be made, but i think it's okay with void EIB::CMD_EIB_Read(string sAddress,string &sCMD_Result,Message *pMessage)
//<-dceag-c275-e->
{
LoggerWrapper::GetInstance()->Write(LV_STATUS, "Received a Read request",);

if(sAddress.length() == 0) {
LoggerWrapper::GetInstance()->Write(LV_STATUS, "Empty Group Address passed as parameter");
return;
}

TelegramMessage tlmsg;
tlmsg.setActionType(READ);

m_msgPool.sendTelegram(&tlmsg);
}

i just needed to know what was a read command; when it's juste a 'please give me your information' one...

i only need to succeed in compiling..

domotiqa.com

I guigolum,

I can give 100$ paypal for developper who make a full dce device for knx/eib !
hoppe can help, because I have a great project which will start in one month so I really have no time for developping some kinds of things
cu

edit: with wiky page and source code well documented

what do you think of this:
http://forum.linuxmce.org/index.php?topic=5420.0

[url="http://www.domotiqa.com"]http://www.domotiqa.com[/url] - home automation

domotiqa.com

If I can't get it, finnaly I will make a access with firefox in lmce (a new button for example) with a link to the knxweb/linknx project
[url="http://www.domotiqa.com"]http://www.domotiqa.com[/url] - home automation

guigolum


domotiqa.com

[url="http://www.domotiqa.com"]http://www.domotiqa.com[/url] - home automation

guigolum

#10
i've tested this and it allows the EIB to make a read request when u  ask him(web admin->wizard->device->interfaces->advanced->send command to device)
void EIB::CMD_EIB_Read(string sAddress,string &sCMD_Result,Message *pMessage)
//<-dceag-c275-e->
{
LoggerWrapper::GetInstance()->Write(LV_STATUS, "Received a Read request");
if(sAddress.length() == 0) {
LoggerWrapper::GetInstance()->Write(LV_STATUS,
   "Empty Group Address passed as parameter");
return;
}

TelegramMessage tlmsg;
tlmsg.setActionType(TelegramMessage::READ);
tlmsg.setGroupAddress(sAddress.c_str());
m_msgPool.sendTelegram(&tlmsg);
}

now, EIB doesn't seem to handle the response.


ok, need to put a LoggerWrapper::GetInstance()->LogAll() in EIB()to log every message...