Ok so some more questions (if you don't mind :~)
First maybe I should explain what I'm doing. I am going through a library created for a gsm module that uses a differnt gsm chip than the module the I am using (SIM900). I would like to go through one of the examples in this library line for line, and try and understand what it is doing, with the hope that I will be able to either modify it to use commands that the SIM900 understands, or to just create my own library.
With that being said I start off with this line in the example that creates an object of type gsmGPRS called myGsmGPRS:
gsmGPRS Â myGsmGPRS(Serial1,&millis,&Serial);
Next I open up the gmsGPRS library to see what that object does:
gsmGPRS::gsmGPRS(Serial& telit, uint32_t(*millis)(), Serial* debug):
GSMbase(telit, millis, debug), getData(NULL)
{
memset(ipAddress1,'\0',IPsize);
memset(ipAddress2,'\0',IPsize);
}
So using the inputs given in the example this is basically:
//gsmGPRS::gsmGPRS(Address of Serial1 named: telit, a millis function pointer, A pointer named debug of Serial type that points to the address of Serial):
This is where I get confused, because after the 3 inputs there is a ':' and another function (GSMbase) which is in another library as seen in the code below
GSMbase::GSMbase(Serial& _telit ,
uint32_t (*_millis)(),Serial* _debug)
:telitPort(_telit),millis(_millis),DebugPort(_debug)
,fullData(NULL),parsedData(NULL)
{}
I assume that all of this simple makes telitPort = Serial1 (my port used to communicate between the arduino and GSM module)
Is that right?