Friday, 6 April 2012

20

2 April - 6 April 2012

Finishing Stage.
Amend the proposal after submitting. Consultation with supervisor about the presentation.

p/s: got butterflies in the stomach to wait until the presentation time

Friday, 30 March 2012

19

26 March - 30 March 2012

Still working on the slide presentation. Bunch of works. Need to understand more about the project and especially on the programming and wireless site. Wonder what questions will be ask from the assessors. 

Oh! forgot to inform, my assessor will be Mdm Nurul Rodziah Abdul Ghafar  from Telecommunication Section and Sir Zainudin B. Kornain from Electronics Section.

Nurul Rodziah Bt Abdul Ghafar 

Zainudin B Kornain



update
my assessor has been change from  Sir Zainudin B. Kornain to Zulkhairi B Mohd Yusof. Still from Electronics Section



Zulkhairi B Mohd Yusof 






Friday, 23 March 2012

18

19 March - 23 March 2012
Doing budget for the project. Other that that, do the slide presentation for proposal presentation on week 12. Need to know what need to be said to the assessors. Quite afraid. Might be see supervisor for more info.

Friday, 16 March 2012

17

12 March - 16 March 2012
Found some Intercom coding make reference.

Message

template <class ST, class CT>


struct Message
{
public:
typedef ST SubjectType;
typedef CT CodeType;


Message() : subject(), code() {}
Message(SubjectType s, CodeType c) : subject(s), code(c) {}


SubjectType subject;
CodeType code;
};


The message template provides the type on which Observer and Notifier are paramaterized.  Different instantiations of Message will lead to different instantiations of Observer and Notifier (and MessageMap andMessageSource, for that matter), so it's important to understand it well.  The good news is that there isn't much to Message -- just two typedefs, two data members and a two constructors.  The typedefs serve to "publish"Message's parameters to other code.  Inside Observer and Notifier those typedefs are used to instantiate code (for example, MessageMap has a member that is a map of Message<>::CodeType to PMethod function pointers).  You can easily create a substitute for Message so long as it adheres to the basic "interface" shown here.
Objects of Message types are fairly lightweight, containing just two data members only one of which is likely to be a pointer.  Still, we don't want to make a lot of copies of them, or repeatedly construct and destruct them.  I stopped short of adding a private copy constructor and assignment operator, for flexibility, but they might be well advised if your code or user data types are large or complex.
The following line declares a Message instantiation with a code type of int and a subject type of const Foo*:
typedef Mm::Message<const Foo*, int> MyMessage;
In this example, I chose a const subject type to illustrate the need for the non-default constructor.  There are situations where aspects (code, subject or user data) of a message type should always be considered non-volitile.  It is possible in those cases to make the subject and or code types const, and hence protect them from modification outside initialization.  However, since a const public member cannot be assigned outside of the initializer, a non-default constructor is required.  Specializing Message is possible and probably the best way to add user-defined data to messages.  For example:

typedef Mm::Message<const Foo*, int> MyMessage;
struct PingMessage : public MyMessage
{
PingMessage() : MyMessage() {}
PingMessage(MyMessage::SubjectType s, MyMessage::CodeType c)


std::list<Bar*> responders;
}


This example declares a message class that included a list of responders.  Assuming that any Bar handling the message adds itself to the list, this type of construct can be useful as a 'ping' -- that is, to see who's listening to a particular Foo.  Of course, adding a reference to Bar in the message definition creates a link (albiet a weak one) between the classes that may not be desirable.  Using an orthogonal SubjectType would eliminate the link.


Observer

template <class M> struct Observer { public: typedef M MessageType; virtual Result OnMessage(const MessageType& message) { return Result(R_OK); } virtual Result Goodbye(const MessageType::SubjectType s) { return Result(R_OK); } };
Observer defines the interface of the client.  That is, messages are passed to and handled by objects implementing the Observer interface appropriate to the message type.  Observer is templatized on the message type, so each type of message will have an insulated, non-overlapping interface.  It is expected that users of Intercom will create implementations of this interface, or use the concrete MessageMap described below.
The interface consists of two methods:
  • The method OnMessage() is called each time a message dispatched on behalf of a subject to which the observer is registered.  The observer receives a const reference to a message of the type used to instantiate the template (MessageType), and is generally expected to return some status though it goes unused in Intercom at the moment.
  • The method Goodbye() is not described by Gamma, though is often found in practice.  This method is called when the registration of the observer is revoked from a particular subject and will no longer get notifications.  The method provides the observer with a convenient opportunity to do finalization or cleanup without having to define a protocol specific to the purpose.



Reference from here

Friday, 9 March 2012

16

5 March - 9 March 2012

Design and Implementation

Intercom is composed of a handful of templates, at the core of which are MessageObserver and Notifier.  In addition to the core templates, MessageMap provides a concrete implementation of Observer, andMessageSource provides a specialization of Notifier more consistent with the Gamma, et. al. definition of 'Subject'.  Each of templates is parameterized on at least the message type and can be specified at compile-time.  I've used typedefs everywhere possible which should make it easy to substitute alternate implementations.  

The core of Intercom is made up of a set of loosely coupled parameterized classes (templates) 
In Intercom, the type of the subject is left undefined and in fact must be specified as a template parameter.  Any type for which std::less<> may be defined is acceptable as a subject, though it will be likely in practice to use a pointer to an existing type from the data model.  To support this model, Intercom assigns the responsibility of taking registrations and distributing messages to a third-party Notifier. 



Friday, 2 March 2012

15

27 February - 2 March 2012
What is compiler? 
program that translates source code into object code. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instructions. Thus, a compiler differs from an interpreter, which analyzes and executes each line of source code in succession, without looking at the entire program. The advantage of interpreters is that they can execute a program immediately. Compilers require some time before an executable program emerges. However, programs produced by compilers run much faster than the same programs executed by an interpreter.
Every high-level programming language (except strictly interpretive languages) comes with a compiler. In effect, the compiler is the language, because it defines which instructions are acceptable.
Because compilers translate source code into object code, which is unique for each type of computer, many compilers are available for the same language. For example, there is a FORTRAN compiler for PCs and another for Apple Macintosh computers. In addition, the compiler industry is quite competitive, so there are actually many compilers for each language on each type of computer. More than a dozen companies develop and sell C compilers for the PC. 



This is some compilers that can be find through the internet 

How Does A Compiler Work In A C++ Program?

A C++ compiler first checks all the syntaxes which are being used in a program. If the syntax is correct then compiler generates an assembly code for assembler. 
At the highest level, it takes c++ source code and converts it into code that the machine will understand. 
As we all know without compiler we are not able to make a program error free the compiler is resposible to check the syntax from right to left compilation.it tally code with the predefined files which are already defined with the compiler then our source file after the syntax checking is converted into object file ready to execute. When we compile file it send a message to operating system a message 0 or 1,if compiler found program error free then it send message and return o to operating system and for error return 1. 

Friday, 24 February 2012

14

20 February - 24 February 2012


Exploring on the C compiler. Never seen or use the C compiler. Feel a little bit shock and doing some research on Google. What is C compiler? How to use it? Will write about C compiler next week. Just collect data on C compiler.


taken from