Ejemplo n.º 1
0
*/
void ChunkRequest::print( ATP_ChunkRequest_t * frame ){
	Log.Debug("ChunkRequest object:"CR);

	if ( getFrameType(frame) == ATP_TRANSFER_REQUEST ) Log.Debug("type:          ATP_TRANSFER_REQUEST"CR );
	if ( getFrameType(frame) == ATP_CHUNK_REQUEST ) Log.Debug(   "type:          ATP_CHUNK_REQUEST"CR );
	if ( getFrameType(frame) == ATP_CHUNK_RESPONSE ) Log.Debug(  "type:          ATP_CHUNK_RESPONSE"CR );

	Log.Debug("frameID:       %s"CR, getFrameID(frame));
	Log.Debug("meshAddress:   %d"CR, getMeshAddress(frame));	
	Log.Debug("datetime:      %d"CR, getDatetime(frame));	
	Log.Debug("atpID:         %d"CR, getAtpID(frame)); 	
	Log.Debug("version:       %d"CR, getVersion(frame));
		      
	if ( getStatus(frame) == ATP_IDLE ) Log.Debug(                 "status:        ATP_IDLE"CR );
	if ( getStatus(frame) == ATP_SUCCESS ) Log.Debug(              "status:        ATP_SUCCESS"CR );
	if ( getStatus(frame) == ATP_FAILED_DURING_TRANSIT ) Log.Debug("status:        ATP_FAILED_DURING_TRANSIT"CR );
	if ( getStatus(frame) == ATP_FAILED_CHECKSUM ) Log.Debug(   "status:        ATP_FAILED_CHECKSUM"CR );
	if ( getStatus(frame) == ATP_FAILED_ENCRYPTION ) Log.Debug( "status:        ATP_FAILED_ENCRYPTION"CR );
	if ( getStatus(frame) == ATP_FAILED_COMPRESSION ) Log.Debug("status:        ATP_FAILED_COMPRESSION"CR );
	if ( getStatus(frame) == ATP_UNSENT ) Log.Debug(            "status:        ATP_UNSENT"CR );
	if ( getStatus(frame) == ATP_SENT ) Log.Debug(              "status:        ATP_SENT"CR );
	if ( getStatus(frame) == ATP_RECEIVED ) Log.Debug(          "status:        ATP_RECEIVED"CR );
	
	Log.Debug("start:         %l"CR, getStart(frame));	
	Log.Debug("length:        %l"CR, getLength(frame));	
	Log.Debug("transferTypes: %s"CR, getTransferTypes(frame));	
Ejemplo n.º 2
0
void init() {
	SYSCALL_ENABLED =	0;
	SLEEP_ENABLED =		0;

	// Initialise all the ISRs and segmentation
	runModule ( &init_descriptor_tables );

	asm volatile ( "sti" );
	runModule ( &initialise_syscalls );

	runModule ( &init_Interupts );

	// Initialise the PIT to 50Hz
	asm volatile ( "sti" );
	init_timer ( 50 );
	asm volatile ( "sti" );

	runModule ( &init_file_system );

	runModule ( &locate_initrd );

	// Start paging.
	runModule ( &initialise_paging );

	runModule ( &init_keyboard );

	datetime_t system_time = getDatetime();

	printf ( "[Time] is %d:%d:%d %d/%d/%d\n", system_time.sec, system_time.min, system_time.hour, system_time.day, system_time.month, system_time.year );

	// Start multitasking.
	runModule ( &initialise_tasking );
	enable_tasking();
	monitor_set_fore_colour ( 12 );
	printf ( "%s pid is: %d\n", gettaskname(), getpid() );
	start_task ( 200, 10, clock, 0, "UserClock" );
	//sleep ( 1 );
	monitor_set_fore_colour ( 15 );

	runModule ( &init_sound_multitsk );

	printf ( "running flat binary at 0x500000\n" );
	load_flat ( "flat.bin", 0x500000 );
	load_flat ( "flat2.bin", 0x501000 );

	//runModule ( &switch_to_user_mode);

}
Ejemplo n.º 3
0
*/
void TransferRequest::print( ATP_TransferRequest_t * frame ){
	Log.Debug("TransferRequest object:"CR);

	if ( getFrameType(frame) == ATP_TRANSFER_REQUEST ) Log.Debug("type:        ATP_TRANSFER_REQUEST"CR );
	if ( getFrameType(frame) == ATP_CHUNK_REQUEST ) Log.Debug(   "type:        ATP_CHUNK_REQUEST"CR );
	if ( getFrameType(frame) == ATP_CHUNK_RESPONSE ) Log.Debug("type:        ATP_CHUNK_RESPONSE"CR );

	Log.Debug("frameID:       %s"CR, getFrameID(frame));
	Log.Debug("frameType:     %d"CR, getFrameType(frame));	
	Log.Debug("meshAddress:   %l"CR, getMeshAddress(frame));	
	Log.Debug("datetime:      %l"CR, getDatetime(frame));	
	Log.Debug("atpID:         %l"CR, getAtpID(frame)); 	
	Log.Debug("version:       %d"CR, getVersion(frame));
	Log.Debug("topchunk:      %d"CR, getTopChunk(frame));
	Log.Debug("chunkcount:    %d"CR, getChunkCount(frame));

	if ( getStatus(frame) == ATP_IDLE ) Log.Debug(                 "status:        ATP_IDLE"CR );
	if ( getStatus(frame) == ATP_SUCCESS ) Log.Debug(              "status:        ATP_SUCCESS"CR );
	if ( getStatus(frame) == ATP_FAILED_DURING_TRANSIT ) Log.Debug("status:        ATP_FAILED_DURING_TRANSIT"CR );
	if ( getStatus(frame) == ATP_FAILED_CHECKSUM ) Log.Debug(   "status:        ATP_FAILED_CHECKSUM"CR );
	if ( getStatus(frame) == ATP_FAILED_ENCRYPTION ) Log.Debug( "status:        ATP_FAILED_ENCRYPTION"CR );
	if ( getStatus(frame) == ATP_FAILED_COMPRESSION ) Log.Debug("status:        ATP_FAILED_COMPRESSION"CR );
	if ( getStatus(frame) == ATP_UNSENT ) Log.Debug(            "status:        ATP_UNSENT"CR );
	if ( getStatus(frame) == ATP_SENT ) Log.Debug(              "status:        ATP_SENT"CR );
	if ( getStatus(frame) == ATP_RECEIVED ) Log.Debug(          "status:        ATP_RECEIVED"CR );
	if ( getStatus(frame) == ATP_WORKING ) Log.Debug(          "status:        ATP_WORKING"CR );
	
	Log.Debug("size:          %l"CR, getSize(frame));
	Log.Debug("expires:       %l"CR, getExpires(frame));	
	Log.Debug("descriptor:    %s"CR, getDescriptor(frame));	
	Log.Debug("source:        %l"CR, getSource(frame));	
	Log.Debug("destination:   %l"CR, getDestination(frame));	
	Log.Debug("fileName:      %s"CR, getFileName(frame));
	
	if ( getBuffer(frame) != 0 ){
		Log.Debug("buffer:      %s"CR, getBuffer(frame));
	}