001 package cnslab.cnsnetwork; 002 003 import java.io.*; 004 005 /*********************************************************************** 006 * Message of recorded spikes transmitted from NetHosts to MainHost. 007 * 008 * Similar to NetMessage, maybe use any one is fine. 009 * 010 * @version 011 * $Date: 2012-08-04 13:43:22 -0500 (Sat, 04 Aug 2012) $ 012 * $Rev: 104 $ 013 * $Author: croft $ 014 * @author 015 * Yi Dong 016 * @author 017 * David Wallace Croft 018 ***********************************************************************/ 019 public final class NetRecordSpike 020 implements Serializable, Transmissible 021 //////////////////////////////////////////////////////////////////////// 022 //////////////////////////////////////////////////////////////////////// 023 { 024 025 private static final long serialVersionUID = 0L; 026 027 // 028 029 /** From which the spike is generated */ 030 public int from; 031 032 /** The spike time */ 033 public double time; 034 035 //////////////////////////////////////////////////////////////////////// 036 //////////////////////////////////////////////////////////////////////// 037 038 public NetRecordSpike ( 039 final double time, 040 final int from ) 041 //////////////////////////////////////////////////////////////////////// 042 { 043 this.time = time; 044 045 this.from = from; 046 } 047 048 //////////////////////////////////////////////////////////////////////// 049 //////////////////////////////////////////////////////////////////////// 050 051 @Override 052 public String toString ( ) 053 //////////////////////////////////////////////////////////////////////// 054 { 055 String tmp = ""; 056 057 tmp = tmp + "From:" + from + " time:" + time + "\n"; 058 059 return tmp; 060 } 061 062 //////////////////////////////////////////////////////////////////////// 063 //////////////////////////////////////////////////////////////////////// 064 }