Author Topic: EIB read function requirement  (Read 5715 times)

guigolum

  • Regular Poster
  • **
  • Posts: 40
    • View Profile
EIB read function requirement
« on: June 14, 2008, 02:24:39 pm »
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

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: EIB read function requirement
« Reply #1 on: June 14, 2008, 02:55:50 pm »
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

  • Regular Poster
  • **
  • Posts: 40
    • View Profile
Re: EIB read function requirement
« Reply #2 on: June 14, 2008, 08:17:46 pm »
thank you, i do it and ask for any question.. or for the answer
« Last Edit: June 14, 2008, 10:55:17 pm by guigolum »

guigolum

  • Regular Poster
  • **
  • Posts: 40
    • View Profile
Re: EIB read function requirement
« Reply #3 on: June 15, 2008, 09:22:16 pm »
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

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: EIB read function requirement
« Reply #4 on: June 15, 2008, 09:37:12 pm »
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

  • Regular Poster
  • **
  • Posts: 40
    • View Profile
Re: EIB read function requirement
« Reply #5 on: June 20, 2008, 08:58:33 am »
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
Code: [Select]
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

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: EIB read function requirement
« Reply #6 on: June 20, 2008, 12:24:31 pm »
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

http://www.domotiqa.com - home automation

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: EIB read function requirement
« Reply #7 on: June 20, 2008, 12:27:51 pm »
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
http://www.domotiqa.com - home automation

guigolum

  • Regular Poster
  • **
  • Posts: 40
    • View Profile
Re: EIB read function requirement
« Reply #8 on: June 23, 2008, 03:41:08 pm »
thanx for the linking :)

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: EIB read function requirement
« Reply #9 on: June 24, 2008, 09:55:35 am »
U R welcome
http://www.domotiqa.com - home automation

guigolum

  • Regular Poster
  • **
  • Posts: 40
    • View Profile
Re: EIB read function requirement
« Reply #10 on: July 04, 2008, 02:18:31 pm »
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)
Code: [Select]
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...
« Last Edit: July 04, 2008, 05:47:25 pm by guigolum »