Tags » Design Pattern

Multi-layered architecture. OFDM modulator.

In previous article I briefly describe multi-layered architecture design pattern. In this post I want to show you some code which implement multi-layered architecture.

/* Main program */
int main()
	/* Declare layers */

	/* Infrastructure layer */
	Cworking_Infrastructure_Layer cworking_infrastructure;

	/* Application layer */
	Cworking_Application_Layer cworking_application;

	/* Presentation layer */
	Cworking_Presentation_Layer cworking_presentation;

	/* Declare input data */
	Cworking_Matrix_Data cworking_input_data;

	/* Declare modulated data */
	Cworking_Matrix_Data cworking_modulated_data;

	/* Declare output data */
	Cworking_Matrix_Data cworking_output_data;

	/* Initialize input and output data */
	cworking_infrastructure.cworking_allocate_matrix( cworking_input_data  );
	cworking_infrastructure.cworking_allocate_matrix( cworking_modulated_data );
	cworking_infrastructure.cworking_allocate_matrix( cworking_output_data );

	/* Load and parse input file */
	cworking_infrastructure.cworking_create_random_data( cworking_input_data );

	/* Plot chart */
	printf("\n-----------------------Input frame-----------------------\n\n");
	cworking_presentation.cworking_show_data( cworking_input_data );

	/* Run application */
	cworking_application.cworking_process_OFDM_modulation( cworking_input_data, cworking_modulated_data );

	printf("\n-----------------------Modulated frame-----------------------\n\n");
	cworking_presentation.cworking_show_data( cworking_modulated_data );

	/* Run application */
	cworking_application.cworking_process_OFDM_demodulation( cworking_modulated_data, cworking_output_data );

	printf("\n-----------------------Demodulated frame-----------------------\n\n");
	cworking_presentation.cworking_show_data( cworking_output_data );

	/* Clean memory */
	cworking_infrastructure.cworking_delete_matrix( cworking_input_data  );
	cworking_infrastructure.cworking_delete_matrix( cworking_modulated_data );
	cworking_infrastructure.cworking_delete_matrix( cworking_output_data );

	return 0;
} 141 more words
Home Page

Implementation Examples On External Polymorphism

Imagine you have two different interface functions to two classes, but yet you want to generalize them without having inheritance. There are reasons for this, maybe the classes are not modifiable, or there are too many of them. 538 more words

Flyweight Pattern

This week I am reading up on the Flyweight Pattern.  The essence of this pattern is to separate the common state from the non-common one to save memory and speed of instantiating objects.   129 more words

Multi-layered Architecture

Multi-layered architecture is a software architecture where different product responsibilities are handled by separate layers. The most common layers used are: user interface and presentation layers, application and business layers, infrastructure layer. 345 more words

Home Page

ভিজিটর ডিজাইন প্যাটার্ন

মনে করুন এমন একটি সফটওয়্যার ডেভেলপ করতে চাই যেটা দিয়ে বাংলাদেশের সব ধরনের অপারেটরের মডেম গুলো দিয়ে ইন্টারনেট এক্সেস করা যাবে । এখন বর্তমানে টেলিটক , জুম(সিটিসেল) এবং গ্রামীণ এই তিনটি অপারেটরের মডেম  চালু রয়েছে । Simplicity এর জন্য আমরা ধরে নিই যে , সফটওয়্যারটির শুধুমাত্র দুইটি বাটন রয়েছে , একটি হচ্ছে মডেম কানেক্ট করার জন্য আরেকটি হচ্ছে ডিসকানেক্ট করার জন্য । তাহলে এই তিন প্রকার মডেমের কমন বৈশিষ্ট গুলো হচ্ছে 524 more words

মজায় মজায় ডিজাইন প্যাটার্ন

Singleton Design Pattern: Bad - Better - Best!

Let me make it very clear before I start with actual context of this post, that there are many good books and blogs available on Java which can explain Singleton pattern better than this post. 451 more words

JAVA - Android

Design Patterns

Design patterns are recurring solution to recurring problems in software architecture.

There are three basic classification of patterns Creational, Structural and Behavioral patterns.

Creational Patterns… 240 more words

Behavioral Patterns