diff --git a/README.md b/README.md index 6b15252..03ce951 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Riscure Inspector uses the `.trs` file format to save and read traces from disk. This library supports reading and writing of `.trs` files, but it does not support modifying existing `.trs` files. ### Installation -TODO +Simply include the latest release of the library jar in your project. It is currently not available through any distribution networks (Maven central, etc..). If this changes, it will be stated here. ### General use tips ##### File creation diff --git a/pom.xml b/pom.xml index e797fdd..072fe0f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.riscure trsfile - 1.0-SNAPSHOT + 1.0 1.8 @@ -16,6 +16,19 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + org.apache.maven.plugins maven-clean-plugin @@ -34,6 +47,11 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + org.apache.maven.plugins maven-clean-plugin diff --git a/src/main/java/com/riscure/trs/Trace.java b/src/main/java/com/riscure/trs/Trace.java index b7745ec..73742cd 100644 --- a/src/main/java/com/riscure/trs/Trace.java +++ b/src/main/java/com/riscure/trs/Trace.java @@ -107,7 +107,7 @@ public void forceFloatCoding() { /** * Get the preferred data type to store samples * - * @return data type + * @return the preferred data type to store samples **/ public int getPreferredCoding() { if (!aggregatesValid) @@ -154,8 +154,7 @@ public String getTitle() { /** * Set the title for this trace. * - * @param title - * the new title + * @param title the new title */ public void setTitle(String title) { this.title = title; @@ -173,8 +172,7 @@ public float getSampleFrequency() { /** * Set the sample frequency for this trace. * - * @param sampleFrequency - * the sample frequency + * @param sampleFrequency the sample frequency */ public void setSampleFrequency(float sampleFrequency) { this.sampleFrequency = sampleFrequency; @@ -182,6 +180,8 @@ public void setSampleFrequency(float sampleFrequency) { /** * Get the supplementary (crypto) data of this trace. + * + * @return the supplementary data of this trace */ public byte[] getData() { return data; @@ -198,6 +198,8 @@ public void setData(byte[] data) { /** * Get the supplementary (crypto) data of this trace as a hexadecimal string. + * + * @return the supplementary (crypto) data of this trace as a hexadecimal string */ public String getDataString() { return new BigInteger(data).toString(16); @@ -205,6 +207,8 @@ public String getDataString() { /** * Get the number of samples that this trace is shifted. + * + * @return the number of samples that this trace is shifted */ public int getShifted() { return shifted; @@ -213,8 +217,7 @@ public int getShifted() { /** * Set the number of samples that this trace is shifted * - * @param shifted - * number of shifted samples + * @param shifted number of shifted samples */ public void setShifted(int shifted) { this.shifted = shifted; @@ -222,28 +225,13 @@ public void setShifted(int shifted) { /** * Get the length of the sample array. + * + * @return the length of the sample array */ public int getNumberOfSamples() { return sample.limit(); } - /** - * Get the TraceSet containing this Trace. - */ - public TraceSet getTraceSet() { - return ts; - } - - /** - * set the TraceSet for this Trace - * - * @param ts - * the new TraceSet - */ - public void setTraceSet(TraceSet ts) { - this.ts = ts; - } - private FloatBuffer sample; /** trace title */ public String title = null; diff --git a/src/main/java/com/riscure/trs/TraceSet.java b/src/main/java/com/riscure/trs/TraceSet.java index 2f9a6aa..a4d5c4a 100644 --- a/src/main/java/com/riscure/trs/TraceSet.java +++ b/src/main/java/com/riscure/trs/TraceSet.java @@ -360,6 +360,7 @@ public static TraceSet open(String file) throws IOException, TRSFormatException * @param file the path to the file to save * @param traces the list of traces to save in the file * @throws IOException when any write exception is encountered + * @throws TRSFormatException when any TRS formatting issues arise from saving the provided traces */ public static void save(String file, List traces) throws IOException, TRSFormatException { TRSMetaData trsMetaData = TRSMetaData.create(); @@ -372,6 +373,7 @@ public static void save(String file, List traces) throws IOException, TRS * @param traces the list of traces to save in the file * @param metaData the metadata associated with the set to create * @throws IOException when any write exception is encountered + * @throws TRSFormatException when any TRS formatting issues arise from saving the provided traces */ public static void save(String file, List traces, TRSMetaData metaData) throws IOException, TRSFormatException { TraceSet traceSet = create(file, metaData); @@ -410,6 +412,7 @@ public static TraceSet create(String file) throws IOException { * SCALE_X is defined for the whole set based on the sampling frequency of the first trace
* SAMPLE_CODING is defined for the whole set based on the values of the first trace
* @param file the path to the file to be created + * @param metaData the user-supplied meta data * @return a writable trace set object * @throws IOException if the file creation failed */